Interface IIntervallContainerViewProvider<E>
- Type Parameters:
E- is the type of the elements of aIIntervallContainerViewProvider.
- All Known Subinterfaces:
IArrayList<E>, IContainer<E>, ILinkedList<E>, IMatrix<E>, IMatrixColumn<E>, IMatrixRow<E>, ISqlRecord
- All Known Implementing Classes:
AbstractContainer, AbstractExtendedContainer, ArrayContainerView, ArrayList, ContainerView, FilterContainerView, ImmutableList, IntervallContainerView, IterableContainerView, LinkedList, MappingContainerView, Matrix, MatrixColumn, MatrixRow, MultiContainerView, SingleContainer, SqlRecord
public interface IIntervallContainerViewProvider<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
IIntervallContainerViewProviderfrom the given oneBasedStartIndex. - Throws:
RuntimeException- if the given oneBasedStartIndex is bigger than the number of elements of the currentIContainer.
-
getViewFromOneBasedStartIndexToOneBasedEndIndex
IContainer<E> getViewFromOneBasedStartIndexToOneBasedEndIndex(int oneBasedStartIndex, int oneBasedEndIndex) - Parameters:
oneBasedStartIndex-oneBasedEndIndex-- Returns:
- a new view of the current
IIntervallContainerViewProviderfrom 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 currentIContainer.
-
getViewToOneBasedEndIndex
- Parameters:
oneBasedEndIndex-- Returns:
- a new view
IContainerof the currentIIntervallContainerViewProviderto 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 currentIContainer.
-
getViewWithoutFirst
IContainer<E> getViewWithoutFirst()- Returns:
- a new view
IContainerview of the currentIIntervallContainerViewProviderwithout the first element. - Throws:
RuntimeException- if the currentIIntervallContainerViewProvideris empty.
-
getViewWithoutFirst
- Parameters:
n-- Returns:
- a new view
IContainerview of the currentIIntervallContainerViewProviderwithout the first n elements. - Throws:
RuntimeException- if the given n is negative.
-
getViewWithoutLast
IContainer<E> getViewWithoutLast()- Returns:
- a new view
IContainerview of the currentIIntervallContainerViewProviderwithout the last element. - Throws:
RuntimeException- if the currentIIntervallContainerViewProvideris empty.
-
getViewWithoutLast
- Parameters:
n-- Returns:
- a new view
IContainerof the currentIIntervallContainerViewProviderwithout the last n elements. - Throws:
RuntimeException- if the given n is negative.
-