Package xyz.gmitch215.socketmc.util.math
Class Divisor
java.lang.Object
xyz.gmitch215.socketmc.util.math.Divisor
An Integer Iterator through a division operation.
-
Constructor Summary
ConstructorDescriptionDivisor
(int numerator, int denominator) Creates a new divisor for the given numerator and denominator. -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.util.Iterator
forEachRemaining, remove
-
Constructor Details
-
Divisor
public Divisor(int numerator, int denominator) Creates a new divisor for the given numerator and denominator.- Parameters:
numerator
- The numeratordenominator
- The denominator
-
-
Method Details
-
hasNext
public boolean hasNext() -
next
-
asIterable
Returns an iterable for the division of the numerator and denominator.- Parameters:
numerator
- The numeratordenominator
- The denominator- Returns:
- An iterable for the division of the numerator and denominator
-