T
- public class CollectionEnclosedIterable<T> extends Object implements EnclosedIterable<T>
EnclosedIterable
.EnclosedIterable.Functions, EnclosedIterable.ListResolver<T>
Modifier and Type | Method and Description |
---|---|
static <T> EnclosedIterable<T> |
copy(Collection<? extends T> collection) |
boolean |
equals(Object obj) |
void |
foreach(Consumer<T> sink)
Apply the sink to all elements in the Collection.
|
static <T> EnclosedIterable<T> |
from(Collection<? extends T> collection)
Create an
EnclosedIterable from the supplied Collection. |
int |
hashCode() |
boolean |
isEmpty() |
int |
size() |
public static <T> EnclosedIterable<T> from(Collection<? extends T> collection)
EnclosedIterable
from the supplied Collection. Does not copy the collection
so you should only use this if you are about to lose the reference or the collection is immutable.T
- the collection typecollection
- public static <T> EnclosedIterable<T> copy(Collection<? extends T> collection)
public void foreach(Consumer<T> sink)
EnclosedIterable
foreach
in interface EnclosedIterable<T>
public int size()
size
in interface EnclosedIterable<T>
size
in interface Sized
EnclosedIterable.foreach(Consumer)
. Be careful depending on this size
being exact, as in many cases its best efforts value or may be unstable due to concurrent changes.public boolean isEmpty()
isEmpty
in interface EnclosedIterable<T>
isEmpty
in interface Sized
Copyright © 2002-2019 Atlassian. All Rights Reserved.