|
Modifier and Type |
Method and Description |
|
contains |
boolean contains(Object target)
Return true if and only if the specified element is an element of the collection.
boolean contains(Object target)
-
Return true if and only if the specified element is an element of the collection.
- Parameters:
target - The element to find in the list.
- Returns:
- true if and only if
target is an element of the collection.
|
|
find |
<R> R find(FindVisitor<V,R> visitor)
Visit the elements of the collection until the visitor returns a non-null result.
-
Visit the elements of the collection until the visitor returns a non-null result. The elements are visited in the
order defined by the collection (if there is one); otherwise, the visitation order is unspecified.
- Parameters:
visitor - The visitor to call on the elements.
- Returns:
- the first non-null result returned by the visitor, or null if none.
|
|
find |
<R> R find(FindVisitor<V,R> visitor,
R defaultValue)
Visit each element of the collection until the visitor returns a non-null result.
-
Visit each element of the collection until the visitor returns a non-null result. The elements are visited in the
order defined by the collection (if there is one); otherwise, the visitation order is unspecified.
- Parameters:
visitor - The visitor to call on the elements.defaultValue - The value to return if no visitor call returns a non-null result.
- Returns:
- the first non-null result returned by the visitor, or
defaultValue if none.
|
|
forEach |
void forEach(Consumer<? super T> arg0)
void forEach(Consumer<? super T> arg0)
|
|
isEmpty |
boolean isEmpty()
Return true if and only if there are no elements in the collection.
boolean isEmpty()
-
Return true if and only if there are no elements in the collection.
|
|
iterator |
Returns an iterator over non-null elements of type T .
-
Returns an iterator over non-null elements of type T .
- Specified by:
iterator in interface Iterable<T>
- Returns:
- an Iterator.
|
|
size |
int size()
Return the number of elements in the collection.
int size()
-
Return the number of elements in the collection.
|
|
sort |
Return a list containing the members of this collection, sorted in the natural sort order.
-
Return a list containing the members of this collection, sorted in the natural sort order.
- Returns:
- the list.
|
|
sort |
IList<V> sort(Comparator<? super V> c)
Return a list containing the same elements as this collection, but sorted using the specified comparator.
IList< V> sort(Comparator<? super V> c)
-
Return a list containing the same elements as this collection, but sorted using the specified comparator.
- Parameters:
c - The comparator used to determine the order of the elements in the returned list.
- Returns:
- the sorted list.
|
|
spliterator |
Spliterator<V> spliterator()
Return a Spliterator that yields the elements of the collection.
Spliterator< V> spliterator()
-
Return a Spliterator that yields the elements of the collection.
- Specified by:
spliterator in interface Iterable<V>
|
|
stream |
Return a stream of the elements of the collection.
-
Return a stream of the elements of the collection.
|
|
toJavaArray |
<E> E[] toJavaArray(E[] template)
Return a new Java array containing the elements of this collection.
<E> E[] toJavaArray(E[] template)
-
Return a new Java array containing the elements of this collection.
|
|
toJavaList |
Return a new Java list containing the elements of this collection, in the same order (if the collection defines an
order).
-
Return a new Java list containing the elements of this collection, in the same order (if the collection defines an
order).
|
|
toJavaSet |
Return a new Java set containing the elements of this collection.
-
Return a new Java set containing the elements of this collection.
|
|
toJavaUnmodifiableList |
List<V> toJavaUnmodifiableList()
Return a new unmodifiable Java list containing the elements of this collection, in the same order (if the
collection defines an order).
List< V> toJavaUnmodifiableList()
-
Return a new unmodifiable Java list containing the elements of this collection, in the same order (if the
collection defines an order).
|
|
toJavaUnmodifiableSet |
Set<V> toJavaUnmodifiableSet()
Return a new Java set containing the elements of this collection.
Set< V> toJavaUnmodifiableSet()
-
Return a new Java set containing the elements of this collection.
|
|
visit |
void visit(Visitor<V> visitor)
Visit each element of the collection.
-
Visit each element of the collection. The elements are visited in the order defined by the collection (if there is
one); otherwise, the visitation order is unspecified.
- Parameters:
visitor - The visitor to call on the elements.
|