Top Description Fields Constructors Methods
org.apache.sshd.common.util.helper

public Class LazyIterablesConcatenator<T>

extends Object
implements Iterable<T>
Class Inheritance
All Implemented Interfaces
java.lang.Iterable
Type Parameters
<T>
Type of element being iterared
Imports
java.util.Collections, .Iterator, .NoSuchElementException

Creates a "smooth" wrapping Iterable using several underlying ones to provide the values. The "lazy" denomination is due to the fact that no iterable is consulted until the one(s) before it have been fully exhausted.
Author
Apache MINA SSHD Project

Field Summary

Modifier and TypeField and Description
private final Iterable<? extends Iterable<? extends T>>

Constructor Summary

AccessConstructor and Description
public
LazyIterablesConcatenator(Iterable<? extends Iterable<? extends T>> iterables)

Method Summary

Modifier and TypeMethod and Description
public Iterable<? extends Iterable<? extends T>>
public Iterator<T>
iterator()

Implements java.lang.Iterable.iterator.

Returns an iterator over elements of type T.

public static <
Type if iterated element
T
>
Iterable<T>

Returns:

An Iterable that goes over all the elements in the wrapped iterables one after the other. The denomination "lazy" indicates that no iterable is consulted until the previous one has been fully exhausted.
lazyConcatenateIterables
(Iterable<? extends Iterable<? extends T>>
The iterables to concatenate - ignored if null
iterables
)

public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

iterablesback to summary
private final Iterable<? extends Iterable<? extends T>> iterables

Constructor Detail

LazyIterablesConcatenatorback to summary
public LazyIterablesConcatenator(Iterable<? extends Iterable<? extends T>> iterables)

Method Detail

getIterablesback to summary
public Iterable<? extends Iterable<? extends T>> getIterables()
iteratorback to summary
public Iterator<T> iterator()

Implements java.lang.Iterable.iterator.

Doc from java.lang.Iterable.iterator.

Returns an iterator over elements of type T.

Returns:Iterator<T>

an Iterator.

Annotations
@Override
lazyConcatenateIterablesback to summary
public static <T> Iterable<T> lazyConcatenateIterables(Iterable<? extends Iterable<? extends T>> iterables)
Parameters
<T>
Type if iterated element
iterables:Iterable<? extends Iterable<? extends T>>

The iterables to concatenate - ignored if null

Returns:Iterable<T>

An Iterable that goes over all the elements in the wrapped iterables one after the other. The denomination "lazy" indicates that no iterable is consulted until the previous one has been fully exhausted.

toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

Returns:String

a string representation of the object

Annotations
@Override