Interface CountRequestable<E>

Type Parameters:
E - the type of the elements a CountRequestable.
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 CountRequestable<E>
Author:
Silvan Wyss
  • Method Details

    • getCount

      int getCount()
      Returns:
      the number of elements of the current CountRequestable.
    • getCount

      int getCount(Predicate<E> selector)
      Parameters:
      selector -
      Returns:
      the number of elements the given selector selects from the current CountRequestable. Ignores null elements.
      Throws:
      RuntimeException - if the given selector is null.
    • getCountOf

      int getCountOf(Object element)
      Parameters:
      element -
      Returns:
      the number how many times the current CountRequestable contains the given element.