Diamond Control Suite 3.0

diamondedge.util
Class HashList

java.lang.Object
  extended by java.util.AbstractCollection<E>
      extended by java.util.AbstractList
          extended by diamondedge.util.HashList
All Implemented Interfaces:
Iterable, Collection, List

public class HashList
extends AbstractList
implements List


Field Summary
static int AFTER
           
static int BEFORE
           
 
Fields inherited from class java.util.AbstractList
modCount
 
Constructor Summary
HashList()
           
 
Method Summary
 void add(int index, Object value)
           
 boolean add(Object value)
           
 void add(Object value, Object key)
           
 void add(Object value, Object key, int index)
           
 void add(Object value, Object key, int index, int beforeOrAfter)
           
 void add(Object value, Object key, Object relativeKey, int beforeOrAfter)
           
 void changeKey(Object key, Object newkey)
           
 void clear()
          Removes all elements from the List.
 boolean containsKey(Object key)
          Returns true if this map contains a mapping for the specified key.
 boolean containsValue(Object value)
          Returns true if this map maps one or more keys to the specified value.
 Set entrySet()
           
 Object get(int index)
          Returns the value at the specified position in this list.
 Object get(Object key)
          Returns the value to which this map maps the specified key.
 int getIndex(Object key)
          return 0-based index for key
 Object getKey(int index)
          return key for value at specified index
 String getNextKey()
           
 Set keySet()
           
 Object put(Object key, Object value)
           
 void putAll(Map t)
           
 Object remove(int index)
          Remove an element based on its position in the List.
 boolean remove(Object value)
          Remove the specified element, value, from the List.
 Object removeKey(Object key)
          Remove an element based on its key.
 Object set(int index, Object value)
           
 Object set(Object key, Object value)
           
 void setKey(int index, Object newkey)
           
 int size()
           
 Collection values()
           
 
Methods inherited from class java.util.AbstractList
addAll, equals, hashCode, indexOf, iterator, lastIndexOf, listIterator, listIterator, removeRange, subList
 
Methods inherited from class java.util.AbstractCollection
addAll, contains, containsAll, isEmpty, removeAll, retainAll, toArray, toArray, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.List
addAll, addAll, contains, containsAll, equals, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, removeAll, retainAll, subList, toArray, toArray
 

Field Detail

BEFORE

public static final int BEFORE
See Also:
Constant Field Values

AFTER

public static final int AFTER
See Also:
Constant Field Values
Constructor Detail

HashList

public HashList()
Method Detail

size

public int size()
Specified by:
size in interface Collection
Specified by:
size in interface List
Specified by:
size in class AbstractCollection

get

public Object get(int index)
Returns the value at the specified position in this list. index - An expression that specifies the position of a member of the collection. If a numeric expression, index must be a number from 0 to one less than the size() . If a string expression, index must correspond to the key argument specified when the member referred to was added to the collection

Specified by:
get in interface List
Specified by:
get in class AbstractList

get

public Object get(Object key)
Returns the value to which this map maps the specified key. Returns null if the map contains no mapping for this key. A return value of null does not necessarily indicate that the map contains no mapping for the key; it's also possible that the map explicitly maps the key to null. The containsKey operation may be used to distinguish these two cases.


set

public Object set(int index,
                  Object value)
Specified by:
set in interface List
Overrides:
set in class AbstractList

set

public Object set(Object key,
                  Object value)

add

public boolean add(Object value)
Specified by:
add in interface Collection
Specified by:
add in interface List
Overrides:
add in class AbstractList

add

public void add(int index,
                Object value)
Specified by:
add in interface List
Overrides:
add in class AbstractList

add

public void add(Object value,
                Object key)

add

public void add(Object value,
                Object key,
                Object relativeKey,
                int beforeOrAfter)

add

public void add(Object value,
                Object key,
                int index)

add

public void add(Object value,
                Object key,
                int index,
                int beforeOrAfter)

remove

public Object remove(int index)
Remove an element based on its position in the List.

Specified by:
remove in interface List
Overrides:
remove in class AbstractList

removeKey

public Object removeKey(Object key)
Remove an element based on its key.


remove

public boolean remove(Object value)
Remove the specified element, value, from the List.

Specified by:
remove in interface Collection
Specified by:
remove in interface List
Overrides:
remove in class AbstractCollection

clear

public void clear()
Removes all elements from the List.

Specified by:
clear in interface Collection
Specified by:
clear in interface List
Overrides:
clear in class AbstractList

getIndex

public int getIndex(Object key)
return 0-based index for key


getKey

public Object getKey(int index)
return key for value at specified index


setKey

public void setKey(int index,
                   Object newkey)

changeKey

public void changeKey(Object key,
                      Object newkey)

getNextKey

public String getNextKey()

containsKey

public boolean containsKey(Object key)
Returns true if this map contains a mapping for the specified key.


containsValue

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


put

public Object put(Object key,
                  Object value)

putAll

public void putAll(Map t)

keySet

public Set keySet()

values

public Collection values()

entrySet

public Set entrySet()

Diamond Control Suite 3.0

Diamond Edge and Diamond Control Suite are trademarks or registered trademarks of Diamond Edge, Inc. Copyright 1999-2005 Diamond Edge, Inc. All Rights Reserved.