Interface IndexRequestable<E>
- Type Parameters:
E- the type of the elements aIndexRequestable.
- 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 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 nullRuntimeException- 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.
-