| Modifier and Type | Method and Description |
|---|---|
| public boolean | add(T t)
Redeclares java. Ensures that this collection contains the specified element (optional operation). |
| public boolean | addAll(Collection<? extends T> collection)
Redeclares java. Adds all of the elements in the specified collection to this collection (optional operation). |
| public boolean | addAllIterable(Iterable<? extends T> iterable)
Redeclares org.
|
| public void | clear()
Redeclares java. Removes all of the elements from this collection (optional operation). |
| public boolean | remove(Object o)
Redeclares java. Removes a single instance of the specified element from this collection, if it is present (optional operation). |
| public boolean | removeAll(Collection<?> collection)
Redeclares java. Removes all of this collection's elements that are also contained in the specified collection (optional operation). |
| public boolean | removeAllIterable(Iterable<?> iterable)
Redeclares org.
|
| public boolean | removeIf(Predicate<? super T> predicate)
Redeclares org. Removes all elements in the collection that evaluate to true for the specified predicate. |
| public <P> boolean | removeIfWith(Predicate2<? super T, ? super P> predicate, P parameter)
Redeclares org. Removes all elements in the collection that evaluate to true for the specified predicate2 and parameter. |
| public boolean | retainAll(Collection<?> collection)
Redeclares java. Retains only the elements in this collection that are contained in the specified collection (optional operation). |
| public boolean | retainAllIterable(Iterable<?> iterable)
Redeclares org.
|
| public FixedSizeCollection | tap(Procedure<? super T> procedure)
Redeclares org. Executes the Procedure for each element in the iterable and returns |
| public MutableCollection | with(T element)
Redeclares org. This method allows fixed size collections the ability to add elements to their existing elements. |
| public MutableCollection | withAll(Iterable<? extends T> elements)
Redeclares org. This method allows fixed size collections the ability to add multiple elements to their existing elements. |
| public MutableCollection | without(T element)
Redeclares org. This method allows fixed size collections the ability to remove elements from their existing elements. |
| public MutableCollection | withoutAll(Iterable<? extends T> elements)
Redeclares org. This method allows fixed size collections the ability to remove multiple elements from their existing elements. |
| add | back to summary |
|---|---|
| public boolean add(T t) Redeclares java. Doc from java. Ensures that this collection contains the specified element (optional
operation). Returns
Collections that support this operation may place limitations on what
elements may be added to this collection. In particular, some
collections will refuse to add
If a collection refuses to add a particular element for any reason
other than that it already contains the element, it must throw
an exception (rather than returning
| |
| addAll | back to summary |
|---|---|
| public boolean addAll(Collection<? extends T> collection) Redeclares java. Doc from java. Adds all of the elements in the specified collection to this collection (optional operation). The behavior of this operation is undefined if the specified collection is modified while the operation is in progress. (This implies that the behavior of this call is undefined if the specified collection is this collection, and this collection is nonempty.) If the specified collection has a defined encounter order, processing of its elements generally occurs in that order.
| |
| addAllIterable | back to summary |
|---|---|
| public boolean addAllIterable(Iterable<? extends T> iterable) Redeclares org.
| |
| clear | back to summary |
|---|---|
| public void clear() Redeclares java. Doc from java. Removes all of the elements from this collection (optional operation). The collection will be empty after this method returns.
| |
| remove | back to summary |
|---|---|
| public boolean remove(Object o) Redeclares java. Doc from java. Removes a single instance of the specified element from this
collection, if it is present (optional operation). More formally,
removes an element
| |
| removeAll | back to summary |
|---|---|
| public boolean removeAll(Collection<?> collection) Redeclares java. Doc from java. Removes all of this collection's elements that are also contained in the specified collection (optional operation). After this call returns, this collection will contain no elements in common with the specified collection.
| |
| removeAllIterable | back to summary |
|---|---|
| public boolean removeAllIterable(Iterable<?> iterable) Redeclares org.
| |
| removeIf | back to summary |
|---|---|
| public boolean removeIf(Predicate<? super T> predicate) Redeclares org. Doc from org. Removes all elements in the collection that evaluate to true for the specified predicate. e.g. return lastNames.removeIf(Predicates.isNull());
| |
| removeIfWith | back to summary |
|---|---|
| public <P> boolean removeIfWith(Predicate2<? super T, ? super P> predicate, P parameter) Redeclares org. Doc from org. Removes all elements in the collection that evaluate to true for the specified predicate2 and parameter. return lastNames.removeIfWith(Predicates2.isNull(), null);
| |
| retainAll | back to summary |
|---|---|
| public boolean retainAll(Collection<?> collection) Redeclares java. Doc from java. Retains only the elements in this collection that are contained in the specified collection (optional operation). In other words, removes from this collection all of its elements that are not contained in the specified collection.
| |
| retainAllIterable | back to summary |
|---|---|
| public boolean retainAllIterable(Iterable<?> iterable) Redeclares org.
| |
| tap | back to summary |
|---|---|
| public FixedSizeCollection Redeclares org. Doc from org. Executes the Procedure for each element in the iterable and returns Example using a Java 8 lambda expression:
RichIterable<Person> tapped =
people.tap(person -> LOGGER.info(person.getName()));
| |
| with | back to summary |
|---|---|
| public MutableCollection Redeclares org. This method allows fixed size collections the ability to add elements to their existing elements. A new instance
of
MutableCollection<String> list;
list = list.with("1");
list = list.with("2");
return list;
| |
| withAll | back to summary |
|---|---|
| public MutableCollection Redeclares org. This method allows fixed size collections the ability to add multiple elements to their existing elements. A new
instance of
MutableCollection<String> list;
list = list.withAll(FastList.newListWith("1", "2"));
return list;
| |
| without | back to summary |
|---|---|
| public MutableCollection Redeclares org. This method allows fixed size collections the ability to remove elements from their existing elements. A new
instance of
MutableCollection<String> list;
list = list.without("1");
list = list.without("2");
return list;
| |
| withoutAll | back to summary |
|---|---|
| public MutableCollection Redeclares org. This method allows fixed size collections the ability to remove multiple elements from their existing elements.
A new instance of
MutableCollection<String> list;
list = list.withoutAll(FastList.newListWith("1", "2"));
return list;
| |