E - the element typeT - the generic typepublic class ChainCollectionImpl<E,T extends java.util.Collection<E>> extends java.lang.Object implements ChainCollection<E,T>
| Modifier and Type | Field and Description |
|---|---|
protected java.util.Collection<E> |
collection
The collection.
|
| Constructor and Description |
|---|
ChainCollectionImpl(java.util.Collection<E> collection)
Instantiates a new abstract chain collection.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
add(E e)
Adds the.
|
boolean |
addAll(java.util.Collection<? extends E> c)
Adds the all.
|
T |
addAllChain(java.util.Collection<? extends E> c)
带链式调用的addAll方法.
|
T |
addChain(E... values)
Adds the chain.
|
T |
addChain(E value)
带链式调用的add方法.
|
void |
clear()
Clear.
|
boolean |
contains(java.lang.Object o)
Contains.
|
boolean |
containsAll(java.util.Collection<?> c)
Contains all.
|
boolean |
equals(java.lang.Object o)
Equals.
|
void |
forEach(java.util.function.Consumer<? super E> action)
For each.
|
int |
hashCode()
Hash code.
|
boolean |
isEmpty()
Checks if is empty.
|
java.util.Iterator<E> |
iterator()
Iterator.
|
java.util.stream.Stream<E> |
parallelStream()
Parallel stream.
|
boolean |
remove(java.lang.Object o)
Removes the.
|
boolean |
removeAll(java.util.Collection<?> c)
Removes the all.
|
boolean |
removeIf(java.util.function.Predicate<? super E> filter)
Removes the if.
|
boolean |
retainAll(java.util.Collection<?> c)
Retain all.
|
int |
size()
Size.
|
java.util.Spliterator<E> |
spliterator()
Spliterator.
|
java.util.stream.Stream<E> |
stream()
Stream.
|
java.lang.Object[] |
toArray()
To array.
|
<A> A[] |
toArray(A[] a)
To array.
|
protected final java.util.Collection<E> collection
public ChainCollectionImpl(java.util.Collection<E> collection)
collection - the collectionpublic T addChain(E value)
Set.add(Object).addChain in interface ChainCollection<E,T extends java.util.Collection<E>>value - 指定键将要关联的值。public T addChain(E... values)
ChainCollectionaddChain in interface ChainCollection<E,T extends java.util.Collection<E>>values - the value arraypublic T addAllChain(java.util.Collection<? extends E> c)
Set.addAll(Collection).addAllChain in interface ChainCollection<E,T extends java.util.Collection<E>>c - 要在此映射中存储的集合public void forEach(java.util.function.Consumer<? super E> action)
forEach in interface java.lang.Iterable<E>action - the actionIterable.forEach(java.util.function.Consumer)public int size()
size in interface java.util.Collection<E>Collection.size()public boolean isEmpty()
isEmpty in interface java.util.Collection<E>Collection.isEmpty()public boolean contains(java.lang.Object o)
contains in interface java.util.Collection<E>o - the oCollection.contains(java.lang.Object)public java.util.Iterator<E> iterator()
public java.lang.Object[] toArray()
toArray in interface java.util.Collection<E>Collection.toArray()public <A> A[] toArray(A[] a)
toArray in interface java.util.Collection<E>A - the generic typea - the aCollection.toArray(java.lang.Object[])public boolean add(E e)
add in interface java.util.Collection<E>e - the eCollection.add(java.lang.Object)public boolean remove(java.lang.Object o)
remove in interface java.util.Collection<E>o - the oCollection.remove(java.lang.Object)public boolean containsAll(java.util.Collection<?> c)
containsAll in interface java.util.Collection<E>c - the cCollection.containsAll(java.util.Collection)public boolean addAll(java.util.Collection<? extends E> c)
addAll in interface java.util.Collection<E>c - the cCollection.addAll(java.util.Collection)public boolean removeAll(java.util.Collection<?> c)
removeAll in interface java.util.Collection<E>c - the cCollection.removeAll(java.util.Collection)public boolean removeIf(java.util.function.Predicate<? super E> filter)
removeIf in interface java.util.Collection<E>filter - the filterCollection.removeIf(java.util.function.Predicate)public boolean retainAll(java.util.Collection<?> c)
retainAll in interface java.util.Collection<E>c - the cCollection.retainAll(java.util.Collection)public void clear()
clear in interface java.util.Collection<E>Collection.clear()public boolean equals(java.lang.Object o)
equals in interface java.util.Collection<E>equals in class java.lang.Objecto - the oCollection.equals(java.lang.Object)public int hashCode()
hashCode in interface java.util.Collection<E>hashCode in class java.lang.ObjectCollection.hashCode()public java.util.Spliterator<E> spliterator()
public java.util.stream.Stream<E> stream()
stream in interface java.util.Collection<E>Collection.stream()