Interface CountRequestable<E>

Type Parameters:
E - is the type of the elements a CountRequestable.
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 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.