Package org.midheaven.math
Class ArithmeticalEnumerable<N,D>
java.lang.Object
org.midheaven.collections.AbstractEnumerableDecorator<N>
org.midheaven.math.ArithmeticalEnumerable<N,D>
- Type Parameters:
N- type of the element being enumeratedD- type of the element resulting from dividingTby a whole number
- All Implemented Interfaces:
Iterable<N>,Enumerable<N>
Represents Arithmetical Enumerable.
-
Constructor Summary
ConstructorsConstructorDescriptionArithmeticalEnumerable(Arithmetic<N, D> arithmetic, Enumerable<N> original) Creates a new ArithmeticalEnumerable. -
Method Summary
Methods inherited from class org.midheaven.collections.AbstractEnumerableDecorator
enumerator, iteratorMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.midheaven.collections.Enumerable
allMatch, any, anyMatch, as, associate, associate, cast, collect, concat, count, distinct, filter, first, flatMap, groupBy, isEmpty, limit, map, maximum, minimum, ofType, peek, reduce, reduce, skip, sorted, toArray, toArray, toArray, toDistinctAssortment, toSequence, toSequence, with, zipMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
ArithmeticalEnumerable
Creates a new ArithmeticalEnumerable.- Parameters:
arithmetic- the arithmetic valueoriginal- the original value
-
-
Method Details
-
sum
Performs sum.- Returns:
- the result of sum
-
average
Performs average.- Returns:
- the result of average
-