Package com.storedobject.common
Class ConvertedIterable<FROM,TO>
java.lang.Object
com.storedobject.common.ConvertedIterable<FROM,TO>
- Type Parameters:
FROM- the type of the elements in the original iterableTO- the type of the elements in the converted iterable
- All Implemented Interfaces:
Iterable<TO>
A decorator class that transforms elements of an iterable by applying a conversion function.
This class allows iteration over a collection of elements, converting each element from its
original type to a different target type during iteration.
- Author:
- Syam
-
Constructor Details
-
ConvertedIterable
Constructs a ConvertedIterable instance by wrapping an existing iterable and applying a conversion function to its elements.- Parameters:
original- The original iterable containing elements of type FROM.converter- The function used to convert elements from type FROM to type TO.
-
-
Method Details
-
iterator
-