Class LazyMatchingTypeIterable<T>
java.lang.Object
org.apache.sshd.common.util.helper.LazyMatchingTypeIterable<T>
- Type Parameters:
T
- Type of element being selected
- All Implemented Interfaces:
Iterable<T>
Provides a selective
Iterable
over values that match a specific type out of all available. The
"lazy" denomination is due to the fact that the next matching value is calculated on-the-fly every time
Iterator.hasNext()
is called-
Field Details
-
values
-
type
-
-
Constructor Details
-
LazyMatchingTypeIterable
-
-
Method Details
-
getValues
-
getType
-
iterator
-
toString
-
lazySelectMatchingTypes
- Type Parameters:
T
- Type if iterated element- Parameters:
values
- The source values - ignored ifnull
type
- The (never @code null) type of values to select - any value whose type is assignable to this type will be selected by the iterator.- Returns:
Iterable
whoseIterator
selects only values matching the specific type. Note: the matching values are not pre-calculated (hence the "lazy" denomination) - i.e., the match is performed only whenIterator.hasNext()
is called.
-