Constructor and Description |
---|
LayerHash() |
Modifier and Type | Method and Description |
---|---|
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.
|
java.util.List<KeyType> |
elements() |
ValueType |
get(KeyType key) |
ValueType |
getAbove(KeyType key) |
ValueType |
getBeneath(KeyType key) |
ValueType |
getBottom() |
java.util.List<KeyType> |
getKeysAsList() |
ValueType |
getTop() |
java.util.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() |
public int size()
public java.util.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)
Layerable
public boolean moveAbove(KeyType objectToMove, KeyType reference)
Layerable
public boolean moveBeneath(KeyType objectToMove, KeyType reference)
Layerable
moveBeneath
in interface Layerable<KeyType>
public boolean moveToBottom(KeyType key)
Layerable
moveToBottom
in interface Layerable<KeyType>
public boolean moveUp(KeyType key)
Layerable
public boolean moveDown(KeyType key)
Layerable
public java.util.List<KeyType> elements()
public java.util.List<KeyType> keys()
public boolean remove(KeyType key)
public ValueType getTop()
public ValueType getBottom()