Interface ICommonsOrderedMap<KEYTYPE,VALUETYPE>
-
- Type Parameters:
KEYTYPE- May key typeVALUETYPE- Map value type
- All Superinterfaces:
ICloneable<ICommonsMap<KEYTYPE,VALUETYPE>>,ICommonsMap<KEYTYPE,VALUETYPE>,Map<KEYTYPE,VALUETYPE>
- All Known Implementing Classes:
AttributeContainer,AttributeContainerAny,CommonsLinkedHashMap,LoggingLRUMap,LRUMap,NonBlockingProperties,StringMap
public interface ICommonsOrderedMap<KEYTYPE,VALUETYPE> extends ICommonsMap<KEYTYPE,VALUETYPE>
- Author:
- Philip Helger
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default ICommonsOrderedSet<Map.Entry<KEYTYPE,VALUETYPE>>copyOfEntrySet()default ICommonsOrderedSet<KEYTYPE>copyOfKeySet()default ICommonsOrderedSet<KEYTYPE>copyOfKeySet(Predicate<? super KEYTYPE> aFilter)Create a copy of all values matching the passed filter.default <K,V>
ICommonsOrderedMap<K,V>createInstance()Create a new empty map.ICommonsOrderedMap<KEYTYPE,VALUETYPE>getClone()default KEYTYPEgetLastKey()default KEYTYPEgetLastKey(KEYTYPE aDefault)default VALUETYPEgetLastValue()default VALUETYPEgetLastValue(VALUETYPE aDefault)-
Methods inherited from interface com.helger.commons.collection.impl.ICommonsMap
addAll, containsAnyEntry, containsAnyKey, containsAnyValue, copyOfValues, copyOfValues, copyOfValuesMapped, copyOfValuesMapped, findFirstEntry, findFirstKey, findFirstValue, forEach, forEachKey, forEachKey, forEachValue, forEachValue, getAsUnmodifiable, getFirstEntry, getFirstEntry, getFirstKey, getFirstKey, getFirstValue, getFirstValue, getSortedByKey, getSortedByValue, getSwappedKeyValues, isNotEmpty, put, putAll, putAll, putAllMapped, putAllMapped, putAllMapped, putIf, putIfNotNull, removeAll, removeIf, removeIfKey, removeIfValue, removeObject, setAll
-
Methods inherited from interface java.util.Map
clear, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, equals, forEach, get, getOrDefault, hashCode, isEmpty, keySet, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, values
-
-
-
-
Method Detail
-
createInstance
@Nonnull @ReturnsMutableCopy default <K,V> ICommonsOrderedMap<K,V> createInstance()
Description copied from interface:ICommonsMapCreate a new empty map. Overwrite this if you don't want to useCommonsHashMap.- Specified by:
createInstancein interfaceICommonsMap<KEYTYPE,VALUETYPE>- Type Parameters:
K- Map key typeV- Map value type- Returns:
- A new empty map. Never
null.
-
copyOfKeySet
@Nonnull @ReturnsMutableCopy default ICommonsOrderedSet<KEYTYPE> copyOfKeySet()
- Specified by:
copyOfKeySetin interfaceICommonsMap<KEYTYPE,VALUETYPE>- Returns:
- A new non-
nullset with all keys. - See Also:
Map.keySet(),ICommonsMap.copyOfKeySet(Predicate)
-
copyOfKeySet
@Nonnull @ReturnsMutableCopy default ICommonsOrderedSet<KEYTYPE> copyOfKeySet(@Nullable Predicate<? super KEYTYPE> aFilter)
Description copied from interface:ICommonsMapCreate a copy of all values matching the passed filter.- Specified by:
copyOfKeySetin interfaceICommonsMap<KEYTYPE,VALUETYPE>- Parameters:
aFilter- The filter to be applied. May benull.- Returns:
- A new non-
nullset with all matching keys. - See Also:
Map.keySet(),ICommonsMap.copyOfKeySet()
-
copyOfEntrySet
@Nonnull @ReturnsMutableCopy default ICommonsOrderedSet<Map.Entry<KEYTYPE,VALUETYPE>> copyOfEntrySet()
- Specified by:
copyOfEntrySetin interfaceICommonsMap<KEYTYPE,VALUETYPE>- Returns:
- A new non-
nullcopy of the entry set.
-
getClone
@Nonnull @ReturnsMutableCopy ICommonsOrderedMap<KEYTYPE,VALUETYPE> getClone()
- Specified by:
getClonein interfaceICloneable<KEYTYPE>- Returns:
- A 100% deep-copy of the implementing class.
-
-