Package com.terracottatech.store
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
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-
Nested Class Summary
Nested classes/interfaces inherited from interface com.terracottatech.store.Selection
Selection.ComparableSelection<T extends Comparable<T>>, Selection.DoubleSelection, Selection.IntSelection, Selection.LongSelection, Selection.NumberSelection<T extends Number & Comparable<T>>
-
Method Summary
Methods inherited from interface java.util.Collection
addAll, contains, containsAll, equals, hashCode, isEmpty, iterator, parallelStream, size, spliterator, stream, toArray, toArray, toArray
Methods inherited from interface com.terracottatech.store.Selection
add, clear, first, firstOrElse, firstOrFail, get, getOrElse, getOrFail, last, lastOrElse, lastOrFail, remove, removeAll, removeIf, retainAll, sole, soleOrElse
Methods inherited from interface com.terracottatech.store.Selection.ComparableSelection
greaterThan, greaterThanOrEqual, lessThan, lessThanOrEqual, max, min
-
Method Details
-
sum
T sum()Sum the numeric elements in this Selection, return 0 if there are none.- Returns:
- sum of the selection
-