Interface IterableArrayProvider<E>
- Type Parameters:
E- the type of the elements aIterableArrayProvider
- 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 IterableArrayProvider<E>
- Author:
- Silvan Wyss
-
Method Summary
Modifier and TypeMethodDescriptionObject[]toArray()The time complexity of this method is O(n) if the currentIterableArrayProvidercontains n elements.byte[]toByteArray(Function<E, Byte> byteMapper) The time complexity of this method is O(n) if the currentIterableArrayProvidercontains n elements.char[]toCharArray(Function<E, Character> charMapper) The time complexity of this method is O(n) if the currentIterableArrayProvidercontains n elements.double[]toDoubleArray(ToDoubleFunction<E> doubleMapper) The time complexity of this method is O(n) if the currentIterableArrayProvidercontains n elements.int[]toIntArray(ToIntFunction<E> intMapper) The time complexity of this method is O(n) if the currentIterableArrayProvidercontains n elements.long[]toLongArray(ToLongFunction<E> longMapper) The time complexity of this method is O(n) if the currentIterableArrayProvidercontains n elements.String[]The time complexity of this method is O(n) if the currentIterableArrayProvidercontains n elements.
-
Method Details
-
toArray
Object[] toArray()The time complexity of this method is O(n) if the currentIterableArrayProvidercontains n elements.- Returns:
- a new array with the elements of the current
IterableArrayProvider
-
toByteArray
The time complexity of this method is O(n) if the currentIterableArrayProvidercontains n elements.- Parameters:
byteMapper-- Returns:
- a new array with the bytes the given byteMapper maps from the
elements of the current
IterableArrayProvider. Maps null elements to 0 - Throws:
RuntimeException- if the given byteMapper is null
-
toCharArray
The time complexity of this method is O(n) if the currentIterableArrayProvidercontains n elements.- Parameters:
charMapper-- Returns:
- a new array with the chars the given charMapper maps from the
elements of the current
IterableArrayProvider. Maps null elements to a space - Throws:
RuntimeException- if the given charMapper is null
-
toDoubleArray
The time complexity of this method is O(n) if the currentIterableArrayProvidercontains n elements.- Parameters:
doubleMapper-- Returns:
- a new array with the doubles the given doubleMapper maps from the
elements of the current
IterableArrayProvider. Maps null elements to 0.0 - Throws:
RuntimeException- if the given doubleMapper is null
-
toIntArray
The time complexity of this method is O(n) if the currentIterableArrayProvidercontains n elements.- Parameters:
intMapper-- Returns:
- a new array with the ints the given intMapper maps from the elements
of the current
IterableArrayProvider. Maps null elements to 0. Maps null elements to 0 - Throws:
RuntimeException- if the given intMapper is null
-
toLongArray
The time complexity of this method is O(n) if the currentIterableArrayProvidercontains n elements.- Parameters:
longMapper-- Returns:
- a new array with the longs the given longMapper maps from the
elements of the current
IterableArrayProvider. Maps null elements to 0 - Throws:
RuntimeException- if the given longMapper is null
-
toStringArray
String[] toStringArray()The time complexity of this method is O(n) if the currentIterableArrayProvidercontains n elements.- Returns:
- a new array with the
Stringrepresentations of the elements of the currentIterableArrayProvider.
-