ariba.util.core
Class MultiValueHashtable

java.lang.Object
  extended by ariba.util.core.MultiValueHashtable

public class MultiValueHashtable
extends java.lang.Object

A map like class that can store multiple values for the keys.


Constructor Summary
MultiValueHashtable()
           
 
Method Summary
 void clear()
          Removes all keys and elements from the MultiValueHashtable.
 java.lang.Object getFirstValue(java.lang.Object key)
          Returns the first element set for a specific key.
 java.lang.Object getLastValue(java.lang.Object key)
          Returns the last element set for a specific key.
 java.util.List getList(java.lang.Object key)
          Get the vector of entries for the specified key.
 java.util.List getOrCreateList(java.lang.Object key)
          Get the vector of entries for the specified key.
 java.util.Iterator keys()
           
 void put(java.lang.Object key, java.lang.Object value)
          Add a value to the list of values for the specified key.
 int size()
           
 java.lang.String toString()
           
 java.util.Iterator values()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MultiValueHashtable

public MultiValueHashtable()
Method Detail

getList

public java.util.List getList(java.lang.Object key)
Get the vector of entries for the specified key. null will be returned if no keys have been set.


getOrCreateList

public java.util.List getOrCreateList(java.lang.Object key)
Get the vector of entries for the specified key. If no keys have been set a vector will be created and returned.


getLastValue

public java.lang.Object getLastValue(java.lang.Object key)
Returns the last element set for a specific key.


getFirstValue

public java.lang.Object getFirstValue(java.lang.Object key)
Returns the first element set for a specific key.


put

public void put(java.lang.Object key,
                java.lang.Object value)
Add a value to the list of values for the specified key.


clear

public void clear()
Removes all keys and elements from the MultiValueHashtable.


toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

keys

public java.util.Iterator keys()

values

public java.util.Iterator values()

size

public int size()
Returns:
the number of values in this MultiValueHashtable, which may be greater than the number of keys.


AribaWeb User Interface Development Framework
Copyright © 2000-2014 Ariba, Inc. All Rights Reserved.