Interface Selection.NumberSelection<T extends Number & Comparable<T>>

Type Parameters:
T - element type
All Superinterfaces:
Collection<T>, Iterable<T>, Selection<T>, Selection.ComparableSelection<T>
All Known Subinterfaces:
Selection.DoubleSelection, Selection.IntSelection, Selection.LongSelection
Enclosing interface:
Selection<T>

public static interface Selection.NumberSelection<T extends Number & Comparable<T>> extends Selection.ComparableSelection<T>
Selection where all the elements are a subclass of Number. Adds sum() call to Selection
  • Method Details

    • sum

      T sum()
      Sum the numeric elements in this Selection, return 0 if there are none.
      Returns:
      sum of the selection