Class DefaultKeyValueList<K,V>
java.lang.Object
net.thevpc.common.collections.DefaultKeyValueList<K,V>
- All Implemented Interfaces:
Iterable<V>, Collection<V>, List<V>, SequencedCollection<V>, Collection2, KeyValueList<K,V>
Created by vpc on 6/1/16.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidbooleanbooleanaddAll(int index, Collection<? extends V> c) booleanaddAll(Collection<? extends V> c) voidclear()booleanbooleancontainsAll(Collection<?> c) booleancontainsKey(Object key) booleancontainsMappedValue(V object) 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.get(int index) getByValue(V object) returns, it it exists, the value in this list with the same key for value paramintbooleanisEmpty()iterator()keySet()intlistIterator(int index) remove(int index) booleanbooleanremoveAll(Collection<?> c) removeByKey(K k) booleanretainAll(Collection<?> c) intsize()subList(int fromIndex, int toIndex) Object[]toArray()<T> T[]toArray(T[] a) Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Collection
parallelStream, removeIf, stream, toArrayMethods inherited from interface KeyValueList
append, appendAllMethods inherited from interface List
addFirst, addLast, equals, getFirst, getLast, hashCode, removeFirst, removeLast, replaceAll, reversed, sort, spliterator
-
Constructor Details
-
DefaultKeyValueList
-
DefaultKeyValueList
-
-
Method Details
-
add
-
size
-
isEmpty
-
contains
-
iterator
-
toArray
-
toArray
-
remove
-
removeByKey
- Specified by:
removeByKeyin interfaceKeyValueList<K,V>
-
containsAll
- Specified by:
containsAllin interfaceCollection<K>- Specified by:
containsAllin interfaceList<K>
-
addAll
-
addAll
-
removeAll
-
retainAll
-
clear
-
get
-
getByKey
-
get
-
set
-
add
-
remove
-
indexOf
-
lastIndexOf
- Specified by:
lastIndexOfin interfaceList<K>
-
listIterator
- Specified by:
listIteratorin interfaceList<K>
-
listIterator
- Specified by:
listIteratorin interfaceList<K>
-
subList
-
containsKey
- Specified by:
containsKeyin interfaceKeyValueList<K,V>
-
containsMappedValue
Description copied from interface:KeyValueListReturns 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.- Specified by:
containsMappedValuein interfaceKeyValueList<K,V> - Parameters:
object- value whose presence in this map is to be tested- Returns:
- true if this map maps one or more keys to the specified value
-
getByValue
Description copied from interface:KeyValueListreturns, it it exists, the value in this list with the same key for value param- Specified by:
getByValuein interfaceKeyValueList<K,V> - Parameters:
object- value whose key presence in this map is to be tested- Returns:
- value of the list equivalent to the given value
-
containsValue
Description copied from interface:KeyValueListReturns 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)).- Specified by:
containsValuein interfaceKeyValueList<K,V> - Parameters:
value- element whose presence in this list is to be tested- Returns:
- true if this list contains the specified element
-
keySet
-