Class IterableSearcher
java.lang.Object
ch.nolix.base.commontype.iteratortool.IterableSearcher
- All Implemented Interfaces:
IIterableCountSearcher, IIterableSearcher
- Author:
- Silvan Wyss
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionint<E> EgetStoredAtOneBasedIndex(Iterable<E> iterable, int oneBasedIndex)
-
Constructor Details
-
IterableSearcher
public IterableSearcher()
-
-
Method Details
-
getCount
- Specified by:
getCountin interfaceIIterableCountSearcher- Parameters:
iterable- the examinedIterable, is considered to be empty when is null- Returns:
- the number of elements of the given iterable
-
getStoredAtOneBasedIndex
- Specified by:
getStoredAtOneBasedIndexin interfaceIIterableSearcher- Type Parameters:
E- the type of the elements of the given iterable- Parameters:
iterable- the searchedIterable, is considered to be empty when is nulloneBasedIndex- the one-based index at which an element is requested- Returns:
- the element at the given oneBasedIndexed from the given iterable
-