| Modifier and Type | Field and Description |
|---|---|
| private final CharToObjectFunction | |
| private final CharIterable |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | each(final Procedure<? super V> procedure)
Implements org. The procedure is executed for each element in the iterable. |
| public <P> void | forEachWith(final Procedure2<? super V, ? super P> procedure, final P parameter)
Overrides org. Implements org. The procedure2 is evaluated for each element in the iterable with the specified parameter provided as the second argument. |
| public void | forEachWithIndex(final ObjectIntProcedure<? super V> objectIntProcedure)
Overrides org. Implements org. Iterates over the iterable passing each element and the current relative int index to the specified instance of ObjectIntProcedure. |
| public boolean | isEmpty()
Overrides org. Implements org. Returns true if this iterable has zero items. |
| public Iterator | |
| public boolean | notEmpty()
Overrides default org. The English equivalent of !this.isEmpty() |
| public int | size()
Overrides org. Implements org. Returns the number of items in this iterable. |
| function | back to summary |
|---|---|
| private final CharToObjectFunction<? extends V> function | |
| iterable | back to summary |
|---|---|
| private final CharIterable iterable | |
| CollectCharToObjectIterable | back to summary |
|---|---|
| public CollectCharToObjectIterable(CharIterable iterable, CharToObjectFunction<? extends V> function) | |
| each | back to summary |
|---|---|
| public void each(final Procedure<? super V> procedure) Implements org. Doc from org. The procedure is executed for each element in the iterable. Example using a Java 8 lambda expression: people.each(person -> LOGGER.info(person.getName()));This method is a variant of InternalIterable#forEach(Procedure)
that has a signature conflict with Iterable#forEach(java..
| |
| forEachWith | back to summary |
|---|---|
| public <P> void forEachWith(final Procedure2<? super V, ? super P> procedure, final P parameter) Overrides org. Implements org. Doc from org. The procedure2 is evaluated for each element in the iterable with the specified parameter provided as the second argument. Example using a Java 8 lambda:
people.forEachWith((Person person, Person other) ->
{
if (person.isRelatedTo(other))
{
LOGGER.info(person.getName());
}
}, fred);
Example using an anonymous inner class:
people.forEachWith(new Procedure2<Person, Person>()
{
public void value(Person person, Person other)
{
if (person.isRelatedTo(other))
{
LOGGER.info(person.getName());
}
}
}, fred);
| |
| forEachWithIndex | back to summary |
|---|---|
| public void forEachWithIndex(final ObjectIntProcedure<? super V> objectIntProcedure) Overrides org. Implements org. Doc from org. Iterates over the iterable passing each element and the current relative int index to the specified instance of ObjectIntProcedure. Example using a Java 8 lambda:
people.forEachWithIndex((Person person, int index) -> LOGGER.info("Index: " + index + " person: " + person.getName()));
Example using an anonymous inner class:
people.forEachWithIndex(new ObjectIntProcedure<Person>()
{
public void value(Person person, int index)
{
LOGGER.info("Index: " + index + " person: " + person.getName());
}
});
| |
| isEmpty | back to summary |
|---|---|
| public boolean isEmpty() Overrides org. Implements org. Doc from org. Returns true if this iterable has zero items.
| |
| iterator | back to summary |
|---|---|
| public Iterator Implements java. Doc from java. Returns an iterator over elements of type
| |
| notEmpty | back to summary |
|---|---|
| public boolean notEmpty() Overrides default org. Doc from org. The English equivalent of !this.isEmpty()
| |
| size | back to summary |
|---|---|
| public int size() Overrides org. Implements org. Doc from org. Returns the number of items in this iterable.
| |