com.androidplot.util
Class ArrangeableHash<KeyType,ValueType>
java.lang.Object
com.androidplot.util.ArrangeableHash<KeyType,ValueType>
- Direct Known Subclasses:
- LayoutManager
public class ArrangeableHash<KeyType,ValueType>
- extends Object
Provides a mechanism to quickly retrieve elements via hash key. Also provides
mutable ordering of elements.
ArrangeableHash
public ArrangeableHash()
size
public int size()
get
public ValueType get(KeyType key)
getKeysAsList
public List<KeyType> getKeysAsList()
addLast
public void addLast(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.
- Parameters:
key
- value
-
addFirst
public void addFirst(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.
- Parameters:
key
- value
-
moveToTop
public boolean moveToTop(KeyType element)
moveAbove
public boolean moveAbove(KeyType objectToMove,
KeyType reference)
moveBeneath
public boolean moveBeneath(KeyType objectToMove,
KeyType reference)
moveToBottom
public boolean moveToBottom(KeyType key)
moveUp
public boolean moveUp(KeyType key)
moveDown
public boolean moveDown(KeyType key)
remove
public boolean remove(KeyType key)
Copyright © 2011. All Rights Reserved.