Package icyllis.modernui.lifecycle
Class SafeLinkedHashMap<T,E extends Supplier<T>>
java.lang.Object
icyllis.modernui.lifecycle.SafeLinkedList<T,E>
icyllis.modernui.lifecycle.SafeLinkedHashMap<T,E>
- Type Parameters:
T- the token typeE- the element type, which is associated with the token
- All Implemented Interfaces:
Iterable<E>
LinkedHashMap, which supports modifications during iterations.
Takes more memory that
SafeLinkedList.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturn an element added to prior to an element associated with the given token.booleanReturnstrueif this map contains a mapping for the specified token.protected icyllis.modernui.lifecycle.SafeLinkedList.Node<E> putIfAbsent(E e) If the specified key is not already associated with a value, associates it with the given value.Removes the mapping for a key from this map if it is present.Methods inherited from class icyllis.modernui.lifecycle.SafeLinkedList
descendingIterator, equals, hashCode, head, iterator, iteratorWithAdditions, put, size, tail, toStringMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
SafeLinkedHashMap
public SafeLinkedHashMap()
-
-
Method Details
-
find
-
putIfAbsent
Description copied from class:SafeLinkedListIf the specified key is not already associated with a value, associates it with the given value.- Overrides:
putIfAbsentin classSafeLinkedList<T,E extends Supplier<T>> - Parameters:
e- value to be associated with the specified key- Returns:
- the previous value associated with the specified key,
or
nullif there was no mapping for the key
-
remove
Description copied from class:SafeLinkedListRemoves the mapping for a key from this map if it is present. -
contains
Returnstrueif this map contains a mapping for the specified token. -
ceil
Return an element added to prior to an element associated with the given token.- Parameters:
token- the token
-