Interface IndexRequestable<E>
- Type Parameters:
E- is the type of the elements aIndexRequestable.
- 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 IndexRequestable<E>
- Author:
- Silvan Wyss
-
Method Summary
-
Method Details
-
getOneBasedIndexOfFirst
- Parameters:
selector-- Returns:
- the 1-based index of the first element the given selector selects
from the current
IndexRequestable. Ignores null elements. - Throws:
RuntimeException- if the given selector is null.RuntimeException- if the currentIndexRequestabledoes not contain an element the given selector selects.
-
getOneBasedIndexOfFirstEqualElement
- Parameters:
object-- Returns:
- the 1-based index of the first element of the current
IndexRequestablethat equals the given object. - Throws:
RuntimeException- if the currentIndexRequestabledoes not contain an element that equals the given object.
-
getOneBasedIndexOfFirstOccurrenceOf
- Parameters:
object-- Returns:
- the 1-based index of the first occurrence of the given object in the
current
IndexRequestable. - Throws:
RuntimeException- if the currentIndexRequestabledoes not contain the given object.
-