Interface IterableMappedProvider<E>
- Type Parameters:
E- the type of the elements aIterableMappedProvider
- All Known Subinterfaces:
ExtendedIterable<E>, IAppendableList<E>, IArrayList<E>, ILinkedList<E>, IMatrix<E>, IMatrixColumn<E>, IMatrixRow<E>, ISqlRecord
- All Known Implementing Classes:
AbstractExtendedIterable, ArrayExtendedIterableView, ArrayList, ExtendedIterableFilterView, ExtendedIterableIntervalView, ExtendedIterableMapperView, ExtendedIterableView, ImmutableList, IterableExtendedIterableView, LinkedList, Matrix, MatrixColumn, MatrixRow, MultiExtendedIterableView, SqlRecord
public interface IterableMappedProvider<E>
- Author:
- Silvan Wyss
-
Method Summary
Modifier and TypeMethodDescription<T> ExtendedIterable<T> <T> ExtendedIterable<T> toMultiples(Function<E, ExtendedIterable<T>> multipleMapper) <N extends Number>
ExtendedIterable<N> <T> ExtendedIterable<T> toWithOneBasedIndex(BiFunction<Integer, E, T> mapper)
-
Method Details
-
to
- Type Parameters:
T- the type of the elements the given mapper maps from the elements of the currentIterableMappedProvider- Parameters:
mapper-- Returns:
- a new
ExtendedIterablewith the elements the given mapper maps from the elements of the currentIterableMappedProvider - Throws:
RuntimeException- if the given mapper is nullRuntimeException- if one of the elements of the currentIterableMappedProvideris null
-
toMultiples
- Type Parameters:
T- the type of the elements of theExtendedIterables the given multipleMapper maps from the elements of the currentIterableMappedProvider- Parameters:
multipleMapper-- Returns:
- a new
ExtendedIterablewith the elements of theExtendedIterables the given multipleMapper maps from the elements of the currentIterableMappedProvider - Throws:
RuntimeException- if the given multipleMapper is nullRuntimeException- if one of the elements of the currentIterableMappedProvideris null
-
toNumbers
- Type Parameters:
N- the type of theNumbers the given numberMapper maps from the elements of the currentIterableMappedProvider- Parameters:
numberMapper-- Returns:
- a new
ExtendedIterablewith theNumbers the given numberMapper maps from the elements of the currentIterableMappedProvider. Maps null elements to 0.0 - Throws:
RuntimeException- if the given numberMapper is null
-
toStrings
ExtendedIterable<String> toStrings()- Returns:
- a new
ExtendedIterablewith theStringrepresentations of the elements of the currentExtendedIterable
-
toWithOneBasedIndex
- Type Parameters:
T- the type of the elements the given mapper maps from the elements of the currentIterableMappedProviderand from the one-based index of these elements- Parameters:
mapper-- Returns:
- a new
ExtendedIterablewith the elements the given mapper maps from the elements of the currentIterableMappedProviderand from the one-based index of these elements - Throws:
RuntimeException- if the given mapper is nullRuntimeException- if one of the elements of the currentIterableMappedProvideris null
-