Interface IntervallContainerViewProvider<E>
- Type Parameters:
E- the type of the elements of aIntervallContainerViewProvider.
- All Known Subinterfaces:
ExtendedIterable<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 IntervallContainerViewProvider<E>
- Author:
- Silvan Wyss
-
Method Summary
Modifier and TypeMethodDescriptiongetViewFromOneBasedStartIndex(int oneBasedStartIndex) getViewFromOneBasedStartIndexToOneBasedEndIndex(int oneBasedStartIndex, int oneBasedEndIndex) getViewToOneBasedEndIndex(int oneBasedEndIndex) getViewWithoutFirst(int n) getViewWithoutLast(int n)
-
Method Details
-
getViewFromOneBasedStartIndex
- Parameters:
oneBasedStartIndex-- Returns:
- a new view of the current
IntervallContainerViewProviderfrom the given oneBasedStartIndex. - Throws:
RuntimeException- if the given oneBasedStartIndex is bigger than the number of elements of the currentExtendedIterable.
-
getViewFromOneBasedStartIndexToOneBasedEndIndex
ExtendedIterable<E> getViewFromOneBasedStartIndexToOneBasedEndIndex(int oneBasedStartIndex, int oneBasedEndIndex) - Parameters:
oneBasedStartIndex-oneBasedEndIndex-- Returns:
- a new view of the current
IntervallContainerViewProviderfrom the given oneBasedStartIndex to the given oneBasedEndIndex. - Throws:
RuntimeException- if the given oneBasedStartIndex is not positive.RuntimeException- if the given oneBasedStartIndex is smaller than the given oneBasedEndIndex.RuntimeException- if the given oneBasedEndIndex is bigger than the number of elements of the currentExtendedIterable.
-
getViewToOneBasedEndIndex
- Parameters:
oneBasedEndIndex-- Returns:
- a new view
ExtendedIterableof the currentIntervallContainerViewProviderto the given oneBasedEndIndex. - Throws:
RuntimeException- if the given oneBasedEndIndex is not positive.RuntimeException- if the given oneBasedEndIndex is bigger than the number of the elements of the currentExtendedIterable.
-
getViewWithoutFirst
ExtendedIterable<E> getViewWithoutFirst()- Returns:
- a new view
ExtendedIterableview of the currentIntervallContainerViewProviderwithout the first element. - Throws:
RuntimeException- if the currentIntervallContainerViewProvideris empty.
-
getViewWithoutFirst
- Parameters:
n-- Returns:
- a new view
ExtendedIterableview of the currentIntervallContainerViewProviderwithout the first n elements. - Throws:
RuntimeException- if the given n is negative.
-
getViewWithoutLast
ExtendedIterable<E> getViewWithoutLast()- Returns:
- a new view
ExtendedIterableview of the currentIntervallContainerViewProviderwithout the last element. - Throws:
RuntimeException- if the currentIntervallContainerViewProvideris empty.
-
getViewWithoutLast
- Parameters:
n-- Returns:
- a new view
ExtendedIterableof the currentIntervallContainerViewProviderwithout the last n elements. - Throws:
RuntimeException- if the given n is negative.
-