Package com.androidplot.util
Class LayerHash
-
-
Constructor Summary
Constructors Constructor Description LayerHash()
-
Method Summary
Modifier and Type Method Description intsize()ValueTypeget(@NonNull() KeyType key)List<KeyType>getKeysAsList()synchronized voidaddToTop(@NonNull() KeyType key, @NonNull() 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. synchronized voidaddToBottom(@NonNull() KeyType key, @NonNull() 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. synchronized booleanmoveToTop(@NonNull() KeyType element)Move above all other elements synchronized booleanmoveAbove(@NonNull() KeyType objectToMove, @NonNull() KeyType reference)Move above the specified element synchronized booleanmoveBeneath(@NonNull() KeyType objectToMove, @NonNull() KeyType reference)Move beneath the specified element synchronized booleanmoveToBottom(@NonNull() KeyType key)Move beneath all other elements synchronized booleanmoveUp(@NonNull() KeyType key)Move up by one element synchronized booleanmoveDown(@NonNull() KeyType key)Move down by one element List<KeyType>elements()List<KeyType>keys()synchronized booleanremove(@NonNull() KeyType key)ValueTypegetTop()ValueTypegetBottom()ValueTypegetAbove(@NonNull() KeyType key)ValueTypegetBeneath(@NonNull() KeyType key)-
-
Method Detail
-
size
int size()
-
getKeysAsList
@NonNull() List<KeyType> getKeysAsList()
-
addToTop
synchronized void addToTop(@NonNull() KeyType key, @NonNull() 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.
-
addToBottom
synchronized void addToBottom(@NonNull() KeyType key, @NonNull() 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.
-
moveAbove
synchronized boolean moveAbove(@NonNull() KeyType objectToMove, @NonNull() KeyType reference)
Move above the specified element
-
moveBeneath
synchronized boolean moveBeneath(@NonNull() KeyType objectToMove, @NonNull() KeyType reference)
Move beneath the specified element
-
moveToBottom
synchronized boolean moveToBottom(@NonNull() KeyType key)
Move beneath all other elements
-
getBeneath
@Nullable() ValueType getBeneath(@NonNull() KeyType key)
-
-
-
-