Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

com.tripi.asp.Scripting
Class Dictionary  view Dictionary download Dictionary.java

java.lang.Object
  extended bycom.tripi.asp.Scripting.Dictionary
All Implemented Interfaces:
com.tripi.asp.SimpleMap

public class Dictionary
extends java.lang.Object
implements com.tripi.asp.SimpleMap

Implements the Scripting.Dictionary object available from Server.CreateObject("Scripting.Dictionary")

Version:
0.9

Field Summary
(package private)  java.util.Hashtable _contents
          Contents of this dictionary, prepended with '_' to make it unavailable to ASP scripts
(package private)  java.util.Vector _keys
          Keys of this dictionary, stored in a vector to preserve sort order.
 
Constructor Summary
Dictionary()
          Constructor
 
Method Summary
 void Add(java.lang.String name, java.lang.Object value)
          Stores a value in this dictionary.
 int Count()
          Returns number of elements in this dictionary.
 boolean Exists(java.lang.String name)
          Tests for a key's existance.
 java.lang.Object get(java.lang.Object key)
          Obtains a element from the dictionary.
 java.util.Enumeration getKeys()
          Obtains the keys stored in this dictionary.
 java.lang.Object[] keys()
          Obtains the keys of this dictionary.
 void put(java.lang.Object key, java.lang.Object value)
          Stores an element in the dictionary.
 void Remove(java.lang.String name)
          Removes a value from this dictionary.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_contents

java.util.Hashtable _contents
Contents of this dictionary, prepended with '_' to make it unavailable to ASP scripts


_keys

java.util.Vector _keys
Keys of this dictionary, stored in a vector to preserve sort order. Prepended with '_' to make it unavailable to ASP scripts.

Constructor Detail

Dictionary

public Dictionary()
Constructor

Method Detail

Add

public void Add(java.lang.String name,
                java.lang.Object value)
         throws com.tripi.asp.AspException
Stores a value in this dictionary. Throws an error if the value already exists.


Remove

public void Remove(java.lang.String name)
Removes a value from this dictionary. Throws an error if the value does not exist.


Exists

public boolean Exists(java.lang.String name)
Tests for a key's existance.


Count

public int Count()
Returns number of elements in this dictionary.


get

public java.lang.Object get(java.lang.Object key)
                     throws com.tripi.asp.AspException
Obtains a element from the dictionary.

Specified by:
get in interface com.tripi.asp.SimpleMap

put

public void put(java.lang.Object key,
                java.lang.Object value)
         throws com.tripi.asp.AspException
Stores an element in the dictionary.

Specified by:
put in interface com.tripi.asp.SimpleMap

getKeys

public java.util.Enumeration getKeys()
                              throws com.tripi.asp.AspException
Obtains the keys stored in this dictionary.

Specified by:
getKeys in interface com.tripi.asp.SimpleMap

keys

public java.lang.Object[] keys()
                        throws com.tripi.asp.AspException
Obtains the keys of this dictionary. Converts the internal Vector of keys into an array for conversion to node.