| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.androidplot.util.ZHash<KeyType,ValueType>
public class ZHash<KeyType,ValueType>
Concrete implementation of ZIndexable. Provides fast element retrieval via hash key. Also provides mutable ordering (z indexing) of elements.
| Constructor Summary | |
|---|---|
| ZHash() | |
| Method Summary | |
|---|---|
|  void | addToBottom(KeyType key,
            ValueType value)If key already exists within the structure, it's value is replaced with the new value and it's existing order is maintained. | 
|  void | addToTop(KeyType key,
         ValueType value)If key already exists within the structure, it's value is replaced with the new value and it's existing order is maintained. | 
|  List<KeyType> | elements() | 
|  ValueType | get(KeyType key) | 
|  List<KeyType> | getKeysAsList() | 
|  List<KeyType> | keys() | 
|  boolean | moveAbove(KeyType objectToMove,
          KeyType reference)Move above the specified element | 
|  boolean | moveBeneath(KeyType objectToMove,
            KeyType reference)Move beneath the specified element | 
|  boolean | moveDown(KeyType key)Move down by one element | 
|  boolean | moveToBottom(KeyType key)Move beneath all other elements | 
|  boolean | moveToTop(KeyType element)Move above all other elements | 
|  boolean | moveUp(KeyType key)Move up by one element | 
|  boolean | remove(KeyType key) | 
|  int | size() | 
| Methods inherited from class java.lang.Object | 
|---|
| equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Constructor Detail | 
|---|
public ZHash()
| Method Detail | 
|---|
public int size()
public ValueType get(KeyType key)
public List<KeyType> getKeysAsList()
public void addToTop(KeyType key,
                     ValueType value)
key - value - 
public void addToBottom(KeyType key,
                        ValueType value)
key - value - public boolean moveToTop(KeyType element)
ZIndexable
moveToTop in interface ZIndexable<KeyType>
public boolean moveAbove(KeyType objectToMove,
                         KeyType reference)
ZIndexable
moveAbove in interface ZIndexable<KeyType>
public boolean moveBeneath(KeyType objectToMove,
                           KeyType reference)
ZIndexable
moveBeneath in interface ZIndexable<KeyType>public boolean moveToBottom(KeyType key)
ZIndexable
moveToBottom in interface ZIndexable<KeyType>public boolean moveUp(KeyType key)
ZIndexable
moveUp in interface ZIndexable<KeyType>public boolean moveDown(KeyType key)
ZIndexable
moveDown in interface ZIndexable<KeyType>public List<KeyType> elements()
elements in interface ZIndexable<KeyType>public List<KeyType> keys()
public boolean remove(KeyType key)
| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||