Interface KeyValueList<K,V>
- All Superinterfaces:
Collection<V>, Collection2, Iterable<V>, List<V>, SequencedCollection<V>
- All Known Implementing Classes:
DefaultKeyValueList, UnmodifiableKeyValueList
a Map that implements List interface
was named MapList
-
Method Summary
Modifier and TypeMethodDescriptiondefault KeyValueList<K, V> default KeyValueList<K, V> appendAll(Collection<V> v) booleancontainsKey(Object key) booleancontainsMappedValue(V value) Returns true if this map maps one or more keys to the specified value.booleancontainsValue(Object value) Returns true if this list contains the specified element.getByValue(V value) returns, it it exists, the value in this list with the same key for value paramkeySet()removeByKey(K k) Methods inherited from interface Collection
parallelStream, removeIf, stream, toArrayMethods inherited from interface List
add, add, addAll, addAll, addFirst, addLast, clear, contains, containsAll, equals, get, getFirst, getLast, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeFirst, removeLast, replaceAll, retainAll, reversed, set, size, sort, spliterator, subList, toArray, toArray
-
Method Details
-
getByKey
-
removeByKey
-
containsKey
-
containsMappedValue
Returns true if this map maps one or more keys to the specified value. More formally, returns true if and only if this map contains at least one mapping to a value v such that (value==null ? v==null : value.equals(v)). This operation will probably require time linear in the map size for most implementations of the Map interface.- Parameters:
value- value whose presence in this map is to be tested- Returns:
- true if this map maps one or more keys to the specified value
- Throws:
ClassCastException- if the value is of an inappropriate type for this map (optional)NullPointerException- if the specified value is null and this map does not permit null values (optional)
-
getByValue
-
containsValue
Returns true if this list contains the specified element. More formally, returns true if and only if this list contains at least one element e such that (o==null ? e==null : o.equals(e)).- Parameters:
value- element whose presence in this list is to be tested- Returns:
- true if this list contains the specified element
- Throws:
ClassCastException- if the type of the specified element is incompatible with this list (optional)NullPointerException- if the specified element is null and this list does not permit null elements (optional)
-
keySet
-
append
-
appendAll
-