java.util

Class Hashtable<K,V>

Implemented Interfaces:
Cloneable, Map<K,V>, Serializable
Known Direct Subclasses:
CharacterFilter, ExtendedProperties, Html2Ecs, Properties, RegexpFilter, StringFilter, UIDefaults, WeakHashtable, WordFilter

public class Hashtable<K,V>
extends Dictionary<K,V>
implements Map<K,V>, Cloneable, Serializable

This class implements a hashtable, which maps keys to values. Any non-null object can be used as a key or as a value.

To successfully store and retrieve objects from a hashtable, the objects used as keys must implement the hashCode method and the equals method.

An instance of Hashtable has two parameters that affect its performance: initial capacity and load factor. The capacity is the number of buckets in the hash table, and the initial capacity is simply the capacity at the time the hash table is created. Note that the hash table is open: in the case of a "hash collision", a single bucket stores multiple entries, which must be searched sequentially. The load factor is a measure of how full the hash table is allowed to get before its capacity is automatically increased. The initial capacity and load factor parameters are merely hints to the implementation. The exact details as to when and whether the rehash method is invoked are implementation-dependent.

Generally, the default load factor (.75) offers a good tradeoff between time and space costs. Higher values decrease the space overhead but increase the time cost to look up an entry (which is reflected in most Hashtable operations, including get and put).

The initial capacity controls a tradeoff between wasted space and the need for rehash operations, which are time-consuming. No rehash operations will ever occur if the initial capacity is greater than the maximum number of entries the Hashtable will contain divided by its load factor. However, setting the initial capacity too high can waste space.

If many entries are to be made into a Hashtable, creating it with a sufficiently large capacity may allow the entries to be inserted more efficiently than letting it perform automatic rehashing as needed to grow the table.

This example creates a hashtable of numbers. It uses the names of the numbers as keys:

     Hashtable numbers = new Hashtable();
     numbers.put("one", new Integer(1));
     numbers.put("two", new Integer(2));
     numbers.put("three", new Integer(3));
 

To retrieve a number, use the following code:

     Integer n = (Integer)numbers.get("two");
     if (n != null) {
         System.out.println("two = " + n);
     }
 

As of the Java 2 platform v1.2, this class has been retrofitted to implement Map, so that it becomes a part of Java's collection framework. Unlike the new collection implementations, Hashtable is synchronized.

The Iterators returned by the iterator and listIterator methods of the Collections returned by all of Hashtable's "collection view methods" are fail-fast: if the Hashtable is structurally modified at any time after the Iterator is created, in any way except through the Iterator's own remove or add methods, the Iterator will throw a ConcurrentModificationException. Thus, in the face of concurrent modification, the Iterator fails quickly and cleanly, rather than risking arbitrary, non-deterministic behavior at an undetermined time in the future. The Enumerations returned by Hashtable's keys and values methods are not fail-fast.

Note that the fail-fast behavior of an iterator cannot be guaranteed as it is, generally speaking, impossible to make any hard guarantees in the presence of unsynchronized concurrent modification. Fail-fast iterators throw ConcurrentModificationException on a best-effort basis. Therefore, it would be wrong to write a program that depended on this exception for its correctness: the fail-fast behavior of iterators should be used only to detect bugs.

This class is a member of the ../../../guide/collections/index.html"> Java Collections Framework.

Since:
JDK1.0
See Also:
Object.equals(Object), Object.hashCode(), rehash(), Collection, Map, HashMap, TreeMap, Serialized Form

Constructor Summary

Hashtable()
Constructs a new, empty hashtable with a default initial capacity (11) and load factor, which is 0.75.
Hashtable(extends K, V> t)
Constructs a new hashtable with the same mappings as the given Map.
Hashtable(int initialCapacity)
Constructs a new, empty hashtable with the specified initial capacity and default load factor, which is 0.75.
Hashtable(int initialCapacity, float loadFactor)
Constructs a new, empty hashtable with the specified initial capacity and the specified load factor.

Method Summary

void
clear()
Clears this hashtable so that it contains no keys.
Object
clone()
Creates a shallow copy of this hashtable.
boolean
contains(Object value)
Tests if some key maps into the specified value in this hashtable.
boolean
containsKey(Object key)
Tests if the specified object is a key in this hashtable.
boolean
containsValue(Object value)
Returns true if this Hashtable maps one or more keys to this value.
Enumeration
elements()
Returns an enumeration of the values in this hashtable.
Set>
entrySet()
Returns a Set view of the entries contained in this Hashtable.
boolean
equals(Object o)
Compares the specified Object with this Map for equality, as per the definition in the Map interface.
V
get(Object key)
Returns the value to which the specified key is mapped in this hashtable.
int
hashCode()
Returns the hash code value for this Map as per the definition in the Map interface.
boolean
isEmpty()
Tests if this hashtable maps no keys to values.
Set
keySet()
Returns a Set view of the keys contained in this Hashtable.
Enumeration
keys()
Returns an enumeration of the keys in this hashtable.
V
put(K key, V value)
Maps the specified key to the specified value in this hashtable.
void
putAll(extends K, V> t)
Copies all of the mappings from the specified Map to this Hashtable These mappings will replace any mappings that this Hashtable had for any of the keys currently in the specified Map.
protected void
rehash()
Increases the capacity of and internally reorganizes this hashtable, in order to accommodate and access its entries more efficiently.
V
remove(Object key)
Removes the key (and its corresponding value) from this hashtable.
int
size()
Returns the number of keys in this hashtable.
String
toString()
Returns a string representation of this Hashtable object in the form of a set of entries, enclosed in braces and separated by the ASCII characters "" (comma and space).
Collection
values()
Returns a Collection view of the values contained in this Hashtable.

Methods inherited from class java.util.Dictionary<K,V>

elements, get, isEmpty, keys, put, remove, size

Methods inherited from class java.lang.Object

clone, equals, extends Object> getClass, finalize, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Details

Hashtable

public Hashtable()
Constructs a new, empty hashtable with a default initial capacity (11) and load factor, which is 0.75.
Usages and Demos :

View More Examples of Hashtable()
   1:                 new SimpleLogServiceImpl(), 
   2:                 new Hashtable());
   3:         
   4:         simpleLogServiceTracker = 
   5:             new ServiceTracker(context, SimpleLogService.class.getName(), null);

View Full Code Here
   1:         ServiceRegistration registration = bc.registerService(ModelFactory.class.getName(), factory,
   2:             new Hashtable());
   3:         reference = registration.getReference();
   4:     }

View Full Code Here
   1:         ServiceRegistration registration = bc.registerService(ModelFactory.class.getName(), factory,
   2:             new Hashtable());
   3:         reference = registration.getReference();
   4:     }

View Full Code Here
   1:         list.add(new HashMap());
   2:         list.add(new Hashtable());
   3:         list.add(this);
   4:         list.add(new StringBuffer("13z"));
   5:         return list;  

View Full Code Here
   1:         list.add(new HashMap());
   2:         list.add(new Hashtable());
   3:         list.add(this);
   4:         list.add(new BigDecimal("13.2"));
   5:         list.add(new Integer(1));

View Full Code Here

Hashtable

public Hashtable(extends K,
                 V> t)
Constructs a new hashtable with the same mappings as the given Map. The hashtable is created with an initial capacity sufficient to hold the mappings in the given Map and a default load factor, which is 0.75.
Parameters:
t - the map whose mappings are to be placed in this map.
Throws:
NullPointerException - if the specified map is null.
Since:
1.2
Usages and Demos :

View More Examples of Hashtable(extends K,V> t)
   1:   {
   2:     table=new Hashtable(1,1);
   3:   }
   4: 
   5:   public void put(String _key, Object _value)

View Full Code Here
   1:            if (h == null) 
   2:                h = new Hashtable(101,.75f);
   3:       
   4:         FontKey fontKey = new FontKey(name, style, size);
   5:           Font prevFont = (Font)h.get(fontKey);

View Full Code Here
   1:         logger.debug("getDaoflexSysParams()");
   2:         Hashtable res = new Hashtable(128, 1.0f);
   3:         
   4:         Properties props = System.getProperties();
   5:         if( props==null ) return res;

View Full Code Here
   1:     if (ref_features == null)
   2:         ref_features = new Hashtable(1, 1.0F);
   3:     if (refFeature != null)
   4:         ...
   5:     public double getScore (String name) {
   6:     if (scores == null) scores = new Hashtable(1, 1.0F);
   7:     Score score = (Score) scores.get (name);
   8:         ...
   9:     public Hashtable getScores () {
  10:     if (scores == null) scores = new Hashtable(1, 1.0F);
  11:     return scores;

View Full Code Here

Hashtable

public Hashtable(int initialCapacity)
Constructs a new, empty hashtable with the specified initial capacity and default load factor, which is 0.75.
Parameters:
initialCapacity - the initial capacity of the hashtable.
Throws:
IllegalArgumentException - if the initial capacity is less than zero.
Usages and Demos :

View More Examples of Hashtable(int initialCapacity)
   1:         entries = new Vector(count);
   2:         hashtable = new Hashtable((count > 50) ? count : 50);
   3:         mutableMTH = new MemberTableHash(null, null);
   4:     }

View Full Code Here
   1:         this.name = name;
   2:         tables = new Hashtable((int) (1.25 * numberOfTables) + 1);
   3:         idGenerators = new HashMap(6);
   4:     }

View Full Code Here
   1:         this.name = name;
   2:         tables = new Hashtable( (int)(1.25*numberOfTables) + 1 );
   3:         idGenerators = new HashMap(6);
   4:     }

View Full Code Here
   1:         dbMap = containingDB;
   2:         columns = new Hashtable((int) (1.25 * numberOfColumns) + 1);
   3:     }
   4:         ...
   5:         dbMap = containingDB;
   6:         columns = new Hashtable(20);
   7:     }
   8:         ...
   9:         dbMap = containingDB;
  10:         columns = new Hashtable(20);
  11:     }

View Full Code Here
   1:         dbMap = containingDB;
   2:         columns = new Hashtable( (int)(1.25*numberOfColumns) + 1 );
   3:     }
   4:         ...
   5:         dbMap = containingDB;
   6:         columns = new Hashtable( 20 );
   7:     }
   8:         ...
   9:         dbMap = containingDB;
  10:         columns = new Hashtable( 20 );
  11:     }

View Full Code Here

Hashtable

public Hashtable(int initialCapacity,
                 float loadFactor)
Constructs a new, empty hashtable with the specified initial capacity and the specified load factor.
Parameters:
initialCapacity - the initial capacity of the hashtable.
loadFactor - the load factor of the hashtable.
Throws:
IllegalArgumentException - if the initial capacity is less than zero, or if the load factor is nonpositive.
Usages and Demos :

View More Examples of Hashtable(int initialCapacity,float loadFactor)
   1:   {
   2:     table=new Hashtable(1,1);
   3:   }
   4: 
   5:   public void put(String _key, Object _value)

View Full Code Here
   1:            if (h == null) 
   2:                h = new Hashtable(101,.75f);
   3:       
   4:         FontKey fontKey = new FontKey(name, style, size);
   5:           Font prevFont = (Font)h.get(fontKey);

View Full Code Here
   1:         logger.debug("getDaoflexSysParams()");
   2:         Hashtable res = new Hashtable(128, 1.0f);
   3:         
   4:         Properties props = System.getProperties();
   5:         if( props==null ) return res;

View Full Code Here
   1:     if (ref_features == null)
   2:         ref_features = new Hashtable(1, 1.0F);
   3:     if (refFeature != null)
   4:         ...
   5:     public double getScore (String name) {
   6:     if (scores == null) scores = new Hashtable(1, 1.0F);
   7:     Score score = (Score) scores.get (name);
   8:         ...
   9:     public Hashtable getScores () {
  10:     if (scores == null) scores = new Hashtable(1, 1.0F);
  11:     return scores;

View Full Code Here

Method Details

clear

public void clear()
Clears this hashtable so that it contains no keys.
Specified by:
clear in interface Map<K,V>
Usages and Demos :

View More Examples of clear()
   1: 
   2: import java.util.Hashtable;
   3: 
   4:         ...
   5: class Hashset {
   6:   private final Hashtable table = new Hashtable();
   7: 
   8:         ...
   9:   void clear() {
  10:     table.clear();
  11:   }

View Full Code Here
   1: 
   2: import java.util.Hashtable;
   3: import java.util.Enumeration;
   4:         ...
   5: class Hashset {
   6:   private final Hashtable table = new Hashtable();
   7: 
   8:         ...
   9:   void clear() {
  10:     table.clear();
  11:   }

View Full Code Here
   1: public class DataFeedMessage {
   2:    Hashtable _fields = new Hashtable();
   3:    public DataFeedMessage() {
   4:         ...
   5:    public void parseFormattedMessage(String msg) {
   6:       _fields.clear();
   7:       StringTokenizer st = new StringTokenizer(msg, ":");
   8:       String token = st.nextToken();
   9:       int cnt = new Integer(token).intValue();

View Full Code Here
   1: 
   2: import java.util.Hashtable;
   3: 
   4:         ...
   5: public abstract class DtdContext implements DTDHandler, ValidationContext {
   6:     private final Hashtable notationTable;
   7:         ...
   8:     private final Hashtable unparsedEntityTable;
   9: 
  10:         ...
  11:     public void clearDtdContext() {
  12:         notationTable.clear();

View Full Code Here
   1: 
   2: import java.util.Hashtable;
   3: 
   4:         ...
   5: public abstract class DtdContext implements DTDHandler, ValidationContext {
   6:   private final Hashtable notationTable;
   7:         ...
   8:   private final Hashtable unparsedEntityTable;
   9: 
  10:         ...
  11:   public void clearDtdContext() {
  12:     notationTable.clear();

View Full Code Here

clone

public Object clone()
Creates a shallow copy of this hashtable. All the structure of the hashtable itself is copied, but the keys and values are not cloned. This is a relatively expensive operation.
Overrides:
clone in interface Object
Returns:
a clone of the hashtable.
Usages and Demos :

View More Examples of clone()
   1: 
   2: import java.util.Hashtable;
   3: import java.util.Stack;
   4:         ...
   5:         contexts.push(current);
   6:         current = (Hashtable)current.clone();
   7:     }
   8:         ...
   9:     {
  10:         current = (Hashtable)contexts.pop();
  11:     }
  12:         ...
  13: 
  14:     Hashtable current = new Hashtable();

View Full Code Here
   1: 
   2: import java.util.Hashtable;
   3: 
   4:         ...
   5:   Object childValue(Object parentValue) {
   6:     Hashtable ht = (Hashtable) parentValue;
   7:     if(ht != null) {
   8:         ...
   9:       return ht.clone();
  10:     } else {

View Full Code Here
   1: 
   2:   private Hashtable memory_;
   3: 
   4:         ...
   5: 
   6:     memory_=new Hashtable();
   7:     ((FooList)FooSymbol.get_raw("AGENTS")).add(this);
   8:         ...
   9:     FooAgent r=new FooAgent();
  10:     memory_=(Hashtable)memory_.clone();
  11:     return r;

View Full Code Here
   1: import org.omg.CosNaming.NamingContext;
   2: import java.util.Hashtable;
   3: 
   4:         ...
   5:     public static final Context getInstance(ORB orb, org.omg.CORBA.Object ncref, 
   6:     Hashtable env) throws NamingException {
   7:     if (env != null) {
   8:         ...
   9:         env = (Hashtable) env.clone();
  10:     }

View Full Code Here
   1: import java.util.HashSet;
   2: import java.util.Hashtable;
   3: import java.util.List;
   4:         ...
   5:         
   6:         Hashtable h = new Hashtable();
   7:         list.add(h.elements());
   8:         ...
   9:         
  10:         h = (Hashtable) h.clone();
  11:         h.put("something", "to test");

View Full Code Here

contains

public boolean contains(Object value)
Tests if some key maps into the specified value in this hashtable. This operation is more expensive than the containsKey method.

Note that this method is identical in functionality to containsValue, (which is part of the Map interface in the collections framework).

Parameters:
value - a value to search for.
Returns:
true if and only if some key maps to the value argument in this hashtable as determined by the equals method; false otherwise.
Throws:
NullPointerException - if the value is null.
Usages and Demos :

View More Examples of contains(Object value)
   1: 
   2: import java.util.Hashtable;
   3: 
   4:         ...
   5:     
   6:     private Hashtable     _processed = null;
   7:     
   8:         ...
   9:     protected SchemaUnmarshallerState() {
  10:         _processed   = new Hashtable();
  11:     
  12:         ...
  13:     boolean processed(Schema schema) {
  14:         return _processed.contains(schema);

View Full Code Here
   1: 
   2: import java.util.Hashtable;
   3: import java.util.Enumeration;
   4:         ...
   5: {
   6:     private Hashtable _object2domains;
   7:   
   8:         ...
   9:     {
  10:         _object2domains= new Hashtable();
  11:     }
  12:         ...
  13:         {
  14:             return _object2domains.contains(obj);

View Full Code Here
   1: 
   2:     private Hashtable members;
   3: 
   4:         ...
   5:     leader = -1;
   6:     members = new Hashtable();
   7:     }
   8:         ...
   9: 
  10:     public ReplicationGroupInfo(String task_id, String obs_id, int leader_id, Hashtable member_list) {
  11:     task_name = task_id;
  12:         ...
  13:     public boolean contains(ReplicantInfo rep_info) {
  14:     return members.contains(rep_info);

View Full Code Here
   1:     public boolean contains( Grammar grammar ){
   2:         return fGrammarRegistry.contains( grammar );
   3:     }
   4: 
   5:     public boolean containsNameSpace( String nameSpaceKey ){

View Full Code Here

containsKey

public boolean containsKey(Object key)
Tests if the specified object is a key in this hashtable.
Specified by:
containsKey in interface Map<K,V>
Parameters:
key - possible key.
Returns:
true if and only if the specified object is a key in this hashtable, as determined by the equals method; false otherwise.
Throws:
NullPointerException - if the key is null.
Usages and Demos :

View More Examples of containsKey(Object key)
   1: 
   2: import java.util.Hashtable;
   3: 
   4:         ...
   5:         DBInformation dbInformation = dbManager.getDBInformation();
   6:         Hashtable dbInfo = dbInformation.getDBInfo();
   7:         ...
   8:         Hashtable dictionaryInfo = dbInformation.getDictionaryInfo();
   9: 
  10:         ...
  11:         assertTrue ("Veryifying that DB Info has the DatabaseServerName key",
  12:                 dbInfo.containsKey("DatabaseServerName"));

View Full Code Here
   1: import java.util.Enumeration;
   2: import java.util.Hashtable;
   3: import org.apache.tools.ant.BuildFileTest;
   4:         ...
   5:         executeTarget("testdirect");
   6:         Hashtable files = getResultFiles();
   7:         assertEquals("Depend did not leave correct number of files", 2, 
   8:         ...
   9:         assertTrue("Result did not contain A.class", 
  10:             files.containsKey("A.class"));
  11:         assertTrue("Result did not contain D.class", 
  12:         ...
  13:             files.containsKey("D.class"));

View Full Code Here
   1: import java.util.Enumeration;
   2: import java.util.Hashtable;
   3: import org.apache.tools.ant.BuildFileTest;
   4:         ...
   5:         String[] scannedFiles = scanner.getIncludedFiles();
   6:         Hashtable files = new Hashtable();
   7:         for (int i = 0; i < scannedFiles.length; ++i) {
   8:         ...
   9:         assertTrue("Result did not contain A.class", 
  10:             files.containsKey("A.class"));
  11:         assertTrue("Result did not contain B.class", 
  12:         ...
  13:             files.containsKey("B.class"));

View Full Code Here
   1: import java.net.MalformedURLException;
   2: import java.util.Hashtable;
   3: 
   4:         ...
   5: public class LinkTransformer extends HTMLTransformer {
   6:     protected Hashtable map;
   7:     protected URL base = null;
   8:         ...
   9:         if (map == null)
  10:             map = new Hashtable ();
  11:         map.put (url, href);
  12:         ...
  13:     public boolean isMapped (URL url) {
  14:         return map != null && map.containsKey(url);

View Full Code Here
   1: 
   2: import java.util.Hashtable;
   3: import java.util.StringTokenizer;
   4:         ...
   5:         if (region.names != null)
   6:             this.names = (Hashtable)region.names.clone ();
   7:     }
   8:         ...
   9: 
  10:     protected Hashtable names = null;
  11: 
  12:         ...
  13:     public boolean hasLabel (String name) {
  14:         return names != null && names.containsKey(name);

View Full Code Here

containsValue

public boolean containsValue(Object value)
Returns true if this Hashtable maps one or more keys to this value.

Note that this method is identical in functionality to contains (which predates the Map interface).

Specified by:
containsValue in interface Map<K,V>
Parameters:
value - value whose presence in this Hashtable is to be tested.
Returns:
true if this map maps one or more keys to the specified value.
Throws:
NullPointerException - if the value is null.
Since:
1.2
See Also:
Map
Usages and Demos :

View More Examples of containsValue(Object value)
   1: 
   2: import java.util.Hashtable;
   3: 
   4:         ...
   5: public class ExportNameCollection{
   6:     private Hashtable exportNames = new Hashtable();
   7:     private String sPrefix;
   8:         ...
   9:         String sExportName=outbuf.toString();
  10:         while (exportNames.containsValue(sExportName)){
  11:             sExportName+="a";

View Full Code Here
   1: 
   2:     public boolean hasProfile( Profile profile ) { return table.containsValue( profile ); }
   3: 
   4:         ...
   5: 
   6:     private Hashtable table = new Hashtable();
   7: }

View Full Code Here
   1: import java.util.Collection;
   2: import java.util.Hashtable;
   3: import java.util.Map;
   4:         ...
   5: 
   6:     private Hashtable _map = new Hashtable();
   7:     
   8:         ...
   9:     public boolean containsValue(final Object value) {
  10:         return _map.containsValue(value);
  11:     }

View Full Code Here
   1: import java.util.Enumeration;
   2: import java.util.Hashtable;
   3: import java.util.Map;
   4:         ...
   5:     
   6:     private Hashtable mapKeyPos = null;
   7:     private Object[] keys = null;
   8:         ...
   9:             status = new int[capacity];
  10:             mapKeyPos = new Hashtable(capacity);
  11: 
  12:         ...
  13:     public boolean containsValue(Object value) {
  14:         return mapKeyPos.containsValue(value);

View Full Code Here
   1: 
   2:     private Hashtable tokens;
   3:     private Map multitokens;
   4:         ...
   5:     public boolean containsValue (Object ob) {
   6:         return tokens.containsValue(ob);
   7:     }
   8: 
   9:     public Set entrySet() {

View Full Code Here

elements

public Enumeration elements()
Returns an enumeration of the values in this hashtable. Use the Enumeration methods on the returned object to fetch the elements sequentially.
Overrides:
elements in interface Dictionary<K,V>
Returns:
an enumeration of the values in this hashtable.
Usages and Demos :

View More Examples of elements()
   1:   {
   2:     Hashtable table = new Hashtable();
   3: 
   4:         ...
   5:     
   6:     return table.elements();
   7:   }
   8:   
   9:   public static void main(String[] args)

View Full Code Here
   1:   {
   2:     Hashtable table=new Hashtable();
   3: 
   4:         ...
   5: 
   6:     return table.elements();
   7:   }
   8: 
   9:   public String toString()

View Full Code Here
   1: import java.util.HashSet;
   2: import java.util.Hashtable;
   3: import java.util.List;
   4:         ...
   5:         
   6:         Hashtable h = new Hashtable();
   7:         ...
   8:         list.add(h.elements());
   9:         
  10:         ...
  11:         h.put("something", "to test");
  12:         list.add(h.elements());

View Full Code Here
   1: public class TPLocTable {
   2:   private Hashtable table = new Hashtable();
   3:   private String name = null;
   4:         ...
   5:   public Enumeration getAllSchedules () {
   6:     return table.elements();
   7:   }
   8: 
   9:   public void toXml (PrintWriter out) {

View Full Code Here
   1: 
   2: import java.util.Hashtable;
   3: import java.util.Enumeration;
   4:         ...
   5:     static final long serialVersionUID = -8639077697333708869L;
   6:     private Hashtable m_entity = new Hashtable();
   7:     
   8:         ...
   9:     Enumeration elements() {
  10:         return m_entity.elements();
  11:     }
  12:         ...
  13:     Enumeration parameterEntityElements() {
  14:         return m_para.elements();

View Full Code Here

entrySet

public Set> entrySet()
Returns a Set view of the entries contained in this Hashtable. Each element in this collection is a Map.Entry. The Set is backed by the Hashtable, so changes to the Hashtable are reflected in the Set, and vice-versa. The Set supports element removal (which removes the corresponding entry from the Hashtable), but not element addition.
Returns:
a set view of the mappings contained in this map.
Since:
1.2
See Also:
Map.Entry
Usages and Demos :

View More Examples of entrySet()
   1: public class TPLocTable {
   2:   private Hashtable table = new Hashtable();
   3:   private String name = null;
   4:         ...
   5:     Const.openTag(out, Const.LOC_TABLE);
   6:     for (Iterator i = table.entrySet().iterator(); i.hasNext(); )
   7:       ((SimpleTPLocation) ((Map.Entry) i.next()).getValue()).toXml(out);
   8:     Const.closeTag(out, Const.LOC_TABLE);
   9:     out.flush();

View Full Code Here
   1: import java.util.Iterator;
   2: import java.util.Hashtable;
   3: import java.util.Map;
   4:         ...
   5:         this.appContext = appContext;
   6:         queries = new Hashtable();
   7:     }
   8:         ...
   9:     
  10:     Hashtable queries;
  11:     public void addResult( String queryID, SearchResult sr ) {
  12:         ...
  13:         Iterator iter = queries.entrySet().iterator();

View Full Code Here
   1: import java.util.Collection;
   2: import java.util.Hashtable;
   3: import java.util.Map;
   4:         ...
   5: 
   6:     private Hashtable _map = new Hashtable();
   7:     
   8:         ...
   9: 
  10:     public Set entrySet() { return _map.entrySet(); }

View Full Code Here
   1: import javax.naming.NamingException;
   2: import java.util.Hashtable;
   3: import java.util.Iterator;
   4:         ...
   5: 
   6:     public Context getInitialContext(Hashtable environment) throws NamingException {
   7: 
   8:         ...
   9: 
  10:     protected Hashtable transformEnvironment(Hashtable environment) {
  11: 
  12:         ...
  13: 
  14:         Iterator it = environment.entrySet().iterator();

View Full Code Here
   1: 
   2: import java.util.Hashtable;
   3: import java.util.Iterator;
   4:         ...
   5:     private static final Log log = LogFactory.getLog(DatabaseChangeObserver.class);
   6:     private Hashtable collectionDirtyFlags;
   7:     private Timer flushTimer;
   8:         ...
   9: 
  10:                 Iterator collections = collectionDirtyFlags.entrySet().iterator();
  11:                 int flushCount = 0;

View Full Code Here

equals

public boolean equals(Object o)
Compares the specified Object with this Map for equality, as per the definition in the Map interface.
Specified by:
equals in interface Map<K,V>
Overrides:
equals in interface Object
Parameters:
o - object to be compared for equality with this Hashtable
Returns:
true if the specified Object is equal to this Map.
Since:
1.2
Usages and Demos :

View More Examples of equals(Object o)
   1: 
   2: import java.util.Hashtable;
   3: 
   4:         ...
   5:     public boolean isValidModule(String realm) {
   6:         Hashtable realmHash = ProConsts.stringToHash(realm);
   7:         ...
   8:         return realmHash.equals(ProConsts.getUserAuthenticateInfo());
   9:     }
  10:         ...
  11:     public byte[] evaluateChallenge(byte[] challenge) {
  12:         Hashtable map = new Hashtable();

View Full Code Here
   1: import java.io.ByteArrayOutputStream;
   2: import java.util.Hashtable;
   3: 
   4:         ...
   5:     public boolean isValidModule(String realm) {
   6:         Hashtable realmHash = ProConsts.stringToHash(realm);
   7:         ...
   8:         return realmHash.equals(ProConsts.getUserAuthenticateInfo());
   9:     }
  10:         ...
  11:     public byte[] evaluateChallenge(byte[] challenge) {
  12:         Hashtable map = new Hashtable();

View Full Code Here

get

public V get(Object key)
Returns the value to which the specified key is mapped in this hashtable.
Specified by:
get in interface Map<K,V>
Overrides:
get in interface Dictionary<K,V>
Parameters:
key - a key in the hashtable.
Returns:
the value to which the key is mapped in this hashtable; null if the key is not mapped to any value in this hashtable.
Throws:
NullPointerException - if the key is null.
See Also:
put(Object, Object)
Usages and Demos :

View More Examples of get(Object key)
   1: 
   2: import java.util.Hashtable;
   3: 
   4:         ...
   5: public class GroupDAVObject implements java.io.Serializable {
   6:     private Hashtable headers = null;
   7:     private String content = "";
   8:         ...
   9:     public GroupDAVObject(String httpoutput, int status) {
  10:         headers = new Hashtable();
  11:         extractHeaders(httpoutput);
  12:         ...
  13:         etag = "";
  14:         if (headers.get("etag") != null) {

View Full Code Here
   1: 
   2: import java.util.Hashtable;
   3: 
   4:         ...
   5:                 {
   6:                     cache.get( "key:" + i );
   7:                 }
   8:         ...
   9: 
  10:                 name = "Hashtable";
  11:         ...
  12:                 Hashtable cache2 = new Hashtable();

View Full Code Here
   1: import java.util.Date;
   2: import java.util.Hashtable;
   3: import java.util.Properties;
   4:         ...
   5: 
   6:         if (!(result instanceof Hashtable)) {
   7:             if (!"1".equals(result)
   8:         ...
   9:         }
  10:         Hashtable userdata = (Hashtable) result;
  11:         
  12:         ...
  13:         if (userdata.containsKey("errorcode")) {
  14:             int errorCode = ((Integer)userdata.get("errorcode")).intValue();

View Full Code Here
   1:   private int[] representation_= null;
   2:   Hashtable donnees= new Hashtable();
   3:   public void setTypeAffichage(typeAffichage _typeAff) {
   4:         ...
   5:   public Object getDonnees(int _idMobile) {
   6:     return donnees.get("" + _idMobile);
   7:   }
   8:         ...
   9:           ordresMobiles_= sc.getOrdres();
  10:           if (donnees.get("" + i) == null) {
  11:             Image img=
  12:         ...
  13:           }
  14:           images[i]= (ImageIcon)donnees.get("" + i);

View Full Code Here
   1: import java.net.Socket;
   2: import java.util.Hashtable;
   3: import java.util.List;
   4:         ...
   5:     private static int assocCount = 0;
   6:     private Hashtable properties = null;
   7:     private int rqTimeout = 5000;
   8:         ...
   9:     public Object getProperty(Object key) {
  10:         return properties != null ? properties.get(key) : null;
  11:     }
  12:         ...
  13:         if (properties == null) {
  14:             properties = new Hashtable(2);

View Full Code Here

hashCode

public int hashCode()
Returns the hash code value for this Map as per the definition in the Map interface.
Specified by:
hashCode in interface Map<K,V>
Overrides:
hashCode in interface Object
Since:
1.2
Usages and Demos :

View More Examples of hashCode()
   1: import jp.ujihara.java.util.Enumeration;
   2: import jp.ujihara.java.util.Hashtable;
   3: 
   4:         ...
   5: 
   6:   Hashtable tab;
   7: 
   8:         ...
   9:   {
  10:     tab = new Hashtable();
  11:     if (a != null)
  12:         ...
  13:   {
  14:     return tab.hashCode();

View Full Code Here
   1: import java.util.Enumeration;
   2: import java.util.Hashtable;
   3: 
   4:         ...
   5: 
   6:     private Hashtable map = new Hashtable(11);
   7:     private boolean unsupportedCritExt = false;
   8:         ...
   9:     public int hashCode() {
  10:         return map.hashCode();
  11:     }

View Full Code Here
   1: import java.util.Enumeration;
   2: import java.util.Hashtable;
   3: 
   4:         ...
   5: 
   6:     private Hashtable map = new Hashtable(11);
   7:     private boolean unsupportedCritExt = false;
   8:         ...
   9:     public int hashCode() {
  10:         return map.hashCode();
  11:     }

View Full Code Here

isEmpty

public boolean isEmpty()
Tests if this hashtable maps no keys to values.
Specified by:
isEmpty in interface Map<K,V>
Overrides:
isEmpty in interface Dictionary<K,V>
Returns:
true if this hashtable maps no keys to values; false otherwise.
Usages and Demos :

View More Examples of isEmpty()
   1: public class SetWrapper implements Set {
   2:     private Hashtable myDelegee;
   3: 
   4:         ...
   5:     public SetWrapper() {
   6:         myDelegee = new Hashtable();
   7:     }
   8:         ...
   9:     public SetWrapper(Set initSet) {
  10:         myDelegee = new Hashtable();
  11:         Iterator iter = initSet.iterator();
  12:         ...
  13:     public boolean isEmpty() {
  14:         return myDelegee.isEmpty();

View Full Code Here
   1: public class TPLocTable {
   2:   private Hashtable table = new Hashtable();
   3:   private String name = null;
   4:         ...
   5:   public boolean isEmpty () {
   6:     return table.isEmpty();
   7:   }
   8: 
   9:   public void addSchedule (SimpleTPLocation tp) {

View Full Code Here
   1: import java.util.Enumeration;
   2: import java.util.Hashtable;
   3: import java.io.Serializable;
   4:         ...
   5:     int cents;
   6:     Hashtable elements;
   7: 
   8:         ...
   9:         cents  = 0;
  10:         elements = new Hashtable();
  11:     }
  12:         ...
  13:     {
  14:         return elements.isEmpty();

View Full Code Here
   1: import java.util.Enumeration;
   2: import java.util.Hashtable;
   3: public class
   4:         ...
   5: UnresolvedReferenceList{
   6:     Hashtable refs = new Hashtable();
   7: 
   8:         ...
   9:     hasUnresolvedReferences(){
  10:     return !refs.isEmpty();
  11:     }
  12:         ...
  13:     public void print(PrintStream out){
  14:     if (refs.isEmpty())

View Full Code Here
   1: import java.util.Enumeration;
   2: import java.util.Hashtable;
   3: import org.snia.wbem.cim.CIMInstance;
   4:         ...
   5:     
   6:     Hashtable instanceList=new Hashtable();
   7:     int nextFileID=0;
   8:         ...
   9:     public boolean isEmpty() {
  10:     return(instanceList.isEmpty());
  11:     }

View Full Code Here

keySet

public Set keySet()
Returns a Set view of the keys contained in this Hashtable. The Set is backed by the Hashtable, so changes to the Hashtable are reflected in the Set, and vice-versa. The Set supports element removal (which removes the corresponding entry from the Hashtable), but not element addition.
Specified by:
keySet in interface Map<K,V>
Returns:
a set view of the keys contained in this map.
Since:
1.2
Usages and Demos :

View More Examples of keySet()
   1: public class HashtableSet {
   2:   Hashtable ht=new Hashtable();
   3: 
   4:         ...
   5:   public Set keySet () {
   6:     return ht.keySet();
   7:   }
   8: }

View Full Code Here
   1: import java.util.Iterator;
   2: import java.util.Hashtable;
   3: 
   4:         ...
   5: public class PortfolioValidationException extends Exception {
   6:     Hashtable fields = new Hashtable(3);
   7: 
   8:         ...
   9:     public Iterator getErrorFields() {
  10:         return fields.keySet().iterator();
  11:     }

View Full Code Here
   1: import java.util.Arrays;
   2: import java.util.Hashtable;
   3: 
   4:         ...
   5: public class XMLFilterSet {
   6:     private Hashtable fFilters;
   7: 
   8:         ...
   9:     public XMLFilterSet() {
  10:         fFilters = new Hashtable();
  11:     }
  12:         ...
  13:         String[] filters = new String[fFilters.size()];
  14:         fFilters.keySet().toArray(filters);

View Full Code Here
   1: import javax.naming.NameClassPair;
   2: import java.util.Hashtable;
   3: import java.util.Iterator;
   4:         ...
   5:     
   6:     private Hashtable m_bindings;
   7:     private Iterator iterator;
   8:         ...
   9: 
  10:     public NameClassPairEnumeration(Hashtable bindings) {
  11:         this.m_bindings = bindings;
  12:         ...
  13:         iterator = (m_bindings.keySet()).iterator();

View Full Code Here
   1: import javax.naming.Binding;
   2: import java.util.Hashtable;
   3: import java.util.Iterator;
   4:         ...
   5:     
   6:     private Hashtable m_bindings;
   7:     private Iterator iterator;
   8:         ...
   9: 
  10:     public NamingBindingEnumeration(Hashtable bindings) {
  11:         this.m_bindings = bindings;
  12:         ...
  13:         iterator = (m_bindings.keySet()).iterator();

View Full Code Here

keys

public Enumeration keys()
Returns an enumeration of the keys in this hashtable.
Overrides:
keys in interface Dictionary<K,V>
Returns:
an enumeration of the keys in this hashtable.
Usages and Demos :

View More Examples of keys()
   1: 
   2: import java.util.Hashtable;
   3: import java.util.Enumeration;
   4:         ...
   5: class Hashset {
   6:   private final Hashtable table = new Hashtable();
   7: 
   8:         ...
   9:   void addAll(Hashset set) {
  10:     for (Enumeration enum = set.table.keys(); enum.hasMoreElements();)
  11:       add(enum.nextElement());
  12:         ...
  13:   Enumeration members() {
  14:     return table.keys();

View Full Code Here
   1: import java.util.Enumeration;
   2: import java.util.Hashtable;
   3: 
   4:         ...
   5: class Grammar {
   6:   private Hashtable patterns = new Hashtable();
   7: 
   8:         ...
   9:   Enumeration patternNames() {
  10:     return patterns.keys();
  11:   }

View Full Code Here
   1: import java.util.Enumeration;
   2: import java.util.Hashtable;
   3: import java.util.Vector;
   4:         ...
   5: {
   6: protected Hashtable sourceIndex;
   7: protected Vector targets;
   8:         ...
   9: 
  10: public DefaultProjection(CGObject sourceGraph,CGObject targetGraph,Hashtable sourceIndex,Vector targets)
  11: {
  12:         ...
  13: {
  14:     return sourceIndex.keys();

View Full Code Here
   1: public class DataFeedMessage {
   2:    Hashtable _fields = new Hashtable();
   3:    public DataFeedMessage() {
   4:         ...
   5:    public Enumeration getFieldNames() {
   6:       return _fields.keys();
   7:    }
   8:         ...
   9:       msg.append(":");
  10:       for (Enumeration e =_fields.keys(); e.hasMoreElements();) {
  11:          String name = (String)e.nextElement();

View Full Code Here
   1: 
   2: import java.util.Hashtable ;
   3: import javax.portlet.* ;
   4:         ...
   5: public class MockPortletPreferences implements PortletPreferences {
   6:   private Hashtable map_ ;
   7: 
   8:         ...
   9:   public MockPortletPreferences() {
  10:     map_ = new Hashtable() ;
  11:   }
  12:         ...
  13:   public java.util.Enumeration getNames() {
  14:     return map_.keys() ;

View Full Code Here

put

public V put(K key,
             V value)
Maps the specified key to the specified value in this hashtable. Neither the key nor the value can be null.

The value can be retrieved by calling the get method with a key that is equal to the original key.

Specified by:
put in interface Map<K,V>
Overrides:
put in interface Dictionary<K,V>
Parameters:
key - the hashtable key.
value - the value.
Returns:
the previous value of the specified key in this hashtable, or null if it did not have one.
Throws:
NullPointerException - if the key or value is null.
Usages and Demos :

View More Examples of put(K key,V value)
   1:     
   2:     Hashtable oHT = null;
   3:     if(null == oMap.get(oProcessDefinition.getProcessDefinitionID())){
   4:         ...
   5:       oHT = new Hashtable();
   6:     }else{
   7:         ...
   8:       oHT = (Hashtable)oMap.get(oProcessDefinition.getProcessDefinitionID());
   9:     }
  10:         ...
  11:     oLog.debug("Storing process definition with version ["+i+"]");
  12:     oHT.put(""+i,oProcessDefinition);

View Full Code Here
   1: {
   2:   private static final Hashtable PRIORITIES=new Hashtable(15);
   3: 
   4:         ...
   5:   {
   6:     PRIORITIES.put("|" ,FuFactoryInteger.get(1));
   7:         ...
   8:     PRIORITIES.put("&" ,FuFactoryInteger.get(2));
   9:         ...
  10:     PRIORITIES.put("<" ,FuFactoryInteger.get(3));

View Full Code Here
   1:       oLog.debug("fetched context");
   2:       Hashtable oHT = (Hashtable) oCtx.lookup(sID);
   3:       
   4:         ...
   5: 
   6:     Hashtable oHT = null;
   7:     try {
   8:         ...
   9:       oPD.setVersion(i);
  10:       oHT.put(""+i,oPD);
  11:       
  12:         ...
  13:     if (null != getFactoryInitial()) {
  14:       oProps.put(Context.INITIAL_CONTEXT_FACTORY, getFactoryInitial());

View Full Code Here
   1: import java.util.Vector;
   2: import java.util.Hashtable;
   3: import java.util.StringTokenizer;
   4:         ...
   5: 
   6:   private static Hashtable marks = null;
   7: 
   8:         ...
   9:   {
  10:     marks = new Hashtable();
  11:         ...
  12:     marks.put( "-" , "%3D" );

View Full Code Here
   1: protected JTable jTable1;
   2: protected Hashtable textFields=new Hashtable();
   3: protected JButton applyButton= null;
   4:         ...
   5:     textField=new JTextField(""+signVector.elementAt(row));
   6:     textFields.put(""+row,textField);
   7:     }
   8:         ...
   9:         arityTextField.setText(""+signVector.size());
  10:         textFields.put("-1",arityTextField);
  11:         JPanel panel=new JPanel();

View Full Code Here

putAll

public void putAll(extends K,
                   V> t)
Copies all of the mappings from the specified Map to this Hashtable These mappings will replace any mappings that this Hashtable had for any of the keys currently in the specified Map.
Specified by:
putAll in interface Map<K,V>
Parameters:
t - Mappings to be stored in this map.
Throws:
NullPointerException - if the specified map is null.
Since:
1.2
Usages and Demos :

View More Examples of putAll(extends K,V> t)
   1:         try {
   2:             Hashtable result = new Hashtable();
   3:         ...
   4:             result.putAll(ManifestElement.parseBundleManifest(manifestStream, null));
   5:             return result;
   6:         ...
   7:             Config aConfig = (Config) iter.next();
   8:             Dictionary prop = new Hashtable();
   9:             if (AbstractScriptGenerator.getPropertyAsBoolean(IBuildPropertiesConstants.RESOLVER_DEV_MODE))

View Full Code Here

rehash

protected void rehash()
Increases the capacity of and internally reorganizes this hashtable, in order to accommodate and access its entries more efficiently. This method is called automatically when the number of keys in the hashtable exceeds this hashtable's capacity and load factor.

remove

public V remove(Object key)
Removes the key (and its corresponding value) from this hashtable. This method does nothing if the key is not in the hashtable.
Specified by:
remove in interface Map<K,V>
Overrides:
remove in interface Dictionary<K,V>
Parameters:
key - the key that needs to be removed.
Returns:
the value to which the key had been mapped in this hashtable, or null if the key did not have a mapping.
Throws:
NullPointerException - if the key is null.
Usages and Demos :

View More Examples of remove(Object key)
   1: import java.util.Hashtable;
   2: import java.util.Enumeration;
   3:         ...
   4:     public static void main(String[] args) {
   5:   Hashtable hashtable = new Hashtable();
   6: 
   7:         ...
   8: 
   9:   hashtable.remove("bert");

View Full Code Here
   1: 
   2: import java.util.Hashtable;
   3: 
   4:         ...
   5:         final String password) {
   6:     final Hashtable environment = (Hashtable) getAnonymousEnv().clone();
   7: 
   8:     environment.put(Context.SECURITY_PRINCIPAL, principal);
   9:     environment.put(Context.SECURITY_CREDENTIALS, password);

View Full Code Here
   1:     oLog.debug("map contains [" + oMap.size() + "] items");
   2:     Hashtable oHT = (Hashtable)oMap.get(sProcessDefinition);
   3:     if(null != oHT){
   4:         ...
   5:       oHT.remove(""+iProcessDefinitionVersion);
   6:     }
   7: 

View Full Code Here
   1:     
   2:     public Hashtable marshalling(){
   3:         ...
   4:         Hashtable tAttrib = cEventSR.marshalling();
   5:         tAttrib.put("SRClassName",tAttrib.get("ClassName"));
   6:         ...
   7:         tAttrib.remove("ClassName");
   8:         tAttrib.put("ClassName","SubscribeRemoteEvent");
   9:         ...
  10:     
  11:     public Event unmarshalling(Hashtable pAttrib){

View Full Code Here
   1: import org.apache.tools.ant.Project;
   2: import java.util.Hashtable;
   3: 
   4:         ...
   5:           {
   6:               Hashtable h = project.getReferences();
   7:         ...
   8:               h.remove("DRIVER");
   9:               System.out.println("Driver reference in Project removed ");
  10:         ...
  11:           {
  12:               Hashtable h = project.getReferences();

View Full Code Here

size

public int size()
Returns the number of keys in this hashtable.
Specified by:
size in interface Map<K,V>
Overrides:
size in interface Dictionary<K,V>
Returns:
the number of keys in this hashtable.
Usages and Demos :

View More Examples of size()
   1:         aFile2Copy file;
   2:         Hashtable files;
   3: 
   4:         ...
   5:             try { Thread.sleep(sleepTime); } catch (InterruptedException e) {}
   6:             if (parent.files.size()>0) {
   7:                 synchronized(parent.files) {
   8:         ...
   9:                 }
  10:                 log.service("ImagePusher processing "+procfiles.size()+" files");
  11:                 files=killdups(procfiles);
  12:         ...
  13: 
  14:     private Hashtable killdups(Vector files) {

View Full Code Here
   1: 
   2: import java.util.Hashtable;
   3: import java.util.Iterator;
   4:         ...
   5:     private static final Log log = LogFactory.getLog(DatabaseChangeObserver.class);
   6:     private Hashtable collectionDirtyFlags;
   7:     private Timer flushTimer;
   8:         ...
   9:                 log.info("Successfully flushed " + flushCount + " collections out of " +
  10:                          collectionDirtyFlags.size());
  11:                 collectionDirtyFlags.clear();

View Full Code Here
   1: import java.math.BigDecimal;
   2: import java.util.Hashtable;
   3: import java.util.Iterator;
   4:         ...
   5: 
   6:     public static final byte[] hashtableToByteArray(final Hashtable hash) throws Exception {
   7:         ...
   8:         Hashtable saveData = new Hashtable(hash.size());
   9:         String key = null;

View Full Code Here
   1:         root.addElement( "The following " + 
   2:                          urls.size() + 
   3:                          " URL(s) are considered bad: " );
   4:         ...
   5: 
   6:         java.util.Hashtable rt = URLFetcher.getRealtimeURLs();
   7: 
   8:         ...
   9:         root.addElement( "The following " + 
  10:                          rt.size() + 
  11:                          " URL(s) are being loaded: " );
  12:         ...
  13:             if (rt.get(key) != null )
  14:                 li.addElement( String.valueOf(((Vector)rt.get(key)).size()) )

View Full Code Here
   1: import java.util.Enumeration;
   2: import java.util.Hashtable;
   3: import org.apache.tools.ant.BuildFileTest;
   4:         ...
   5:         executeTarget("testdirect");
   6:         Hashtable files = getResultFiles();
   7:         assertEquals("Depend did not leave correct number of files", 2, 
   8:         ...
   9:             files.size());
  10:         assertTrue("Result did not contain A.class", 
  11:         ...
  12:         executeTarget("testclosure");
  13:         Hashtable files = getResultFiles();

View Full Code Here

toString

public String toString()
Returns a string representation of this Hashtable object in the form of a set of entries, enclosed in braces and separated by the ASCII characters "" (comma and space). Each entry is rendered as the key, an equals sign =, and the associated element, where the toString method is used to convert the key and element to strings.

Overrides to toString method of Object.

Overrides:
toString in interface Object
Returns:
a string representation of this hashtable.
Usages and Demos :

View More Examples of toString()
   1: public class MetricTable {
   2:     Hashtable col=new Hashtable();
   3:     public Float put(String str, String val) throws NumberFormatException, NullPointerException {
   4:         ...
   5:     }
   6:     public String toString() { return col.toString(); }
   7: }

View Full Code Here
   1: import java.io.InputStreamReader;
   2: import java.util.Hashtable;
   3: import java.util.StringTokenizer;
   4:         ...
   5: 
   6:     private Hashtable hash = new Hashtable();
   7:     private static ServerSettings instance = null;
   8:         ...
   9:         if ( !hash.containsKey(key) ) {
  10:             System.out.println(hash.toString());
  11:             throw new IllegalArgumentException("\"" + key + "\" does not exist in settings file!");
  12:         ...
  13:     public String toString() {
  14:         return hash.toString();

View Full Code Here
   1: import jp.ujihara.java.util.Enumeration;
   2: import jp.ujihara.java.util.Hashtable;
   3: 
   4:         ...
   5: 
   6:   Hashtable tab;
   7: 
   8:         ...
   9:   {
  10:     tab = new Hashtable();
  11:     if (a != null)
  12:         ...
  13:   {
  14:     return tab.toString();

View Full Code Here
   1: 
   2: import java.util.Hashtable;
   3: 
   4:         ...
   5: public class ParamSet {
   6:     protected Hashtable params = new Hashtable();
   7: 
   8:         ...
   9:             try{
  10:                 return Integer.parseInt(value.toString());
  11:             }
  12:         ...
  13:             try{
  14:                 return Float.parseFloat(value.toString());

View Full Code Here
   1: 
   2: import java.util.Hashtable;
   3: import java.util.Enumeration;
   4:         ...
   5: 
   6:     private Hashtable queryList;
   7: 
   8:         ...
   9: 
  10:     queryList = new Hashtable();
  11:     }
  12:         ...
  13: 
  14:     return queryList.toString();

View Full Code Here

values

public Collection values()
Returns a Collection view of the values contained in this Hashtable. The Collection is backed by the Hashtable, so changes to the Hashtable are reflected in the Collection, and vice-versa. The Collection supports element removal (which removes the corresponding entry from the Hashtable), but not element addition.
Specified by:
values in interface Map<K,V>
Returns:
a collection view of the values contained in this map.
Since:
1.2
Usages and Demos :

View More Examples of values()
   1: import java.util.Collection;
   2: import java.util.Hashtable;
   3: 
   4:         ...
   5:     private final Object actions_key = new Object();
   6:     private Hashtable actions;
   7: 
   8:         ...
   9:             if (actions == null) {
  10:                 actions = new Hashtable();
  11:                 
  12:         ...
  13:         loadActions();
  14:         return actions.values();

View Full Code Here
   1: import java.util.Collection;
   2: import java.util.Hashtable;
   3: 
   4:         ...
   5: 
   6:     private Hashtable fChangeTable = new Hashtable();
   7:     private int fTotalModelChanges = 0;
   8:         ...
   9:     public Collection getAllModelChanges() {
  10:         return fChangeTable.values();
  11:     }

View Full Code Here
   1: import java.util.Iterator;
   2: import java.util.Hashtable;
   3: import java.util.Enumeration;
   4:         ...
   5:   protected CredentialName client;
   6:   protected Hashtable creds;
   7:   private String defaultUser;
   8:         ...
   9:   {
  10:     creds = new Hashtable();
  11:     this.defaultUser = ctx.getUsername();
  12:         ...
  13:   {
  14:     return creds.values().iterator();

View Full Code Here
   1: import java.util.Collection;
   2: import java.util.Hashtable;
   3: 
   4:         ...
   5: 
   6:     private Hashtable path2node;
   7: 
   8:         ...
   9:             Node[] nodes = new Node[path2node.size()];
  10:             path2node.values().toArray(nodes);
  11:             return nodes;
  12:         ...
  13:         loadChilds();
  14:         return path2node.values();

View Full Code Here
   1: import java.util.Collection;
   2: import java.util.Hashtable;
   3: import java.util.Collections;
   4:         ...
   5: public class PrimaryKey {
   6:     protected Hashtable components = new Hashtable();
   7:     protected String elementName;
   8:         ...
   9:     public Collection getComponents() {
  10:         return components.values();
  11:     }

View Full Code Here