Package org.midheaven.math
Class IntegersRandomGenerator
java.lang.Object
org.midheaven.math.IntegersRandomGenerator
- All Implemented Interfaces:
DiscreteIntervalRandomGenerator<Integer>,IntervalRandomGenerator<Integer>,RandomGenerator<Integer>
public final class IntegersRandomGenerator
extends Object
implements IntervalRandomGenerator<Integer>
Generator for Integers Random values.
-
Method Summary
Modifier and TypeMethodDescriptionprotected final Randombase()Performs base.Performs between.betweenIncluding(Integer lowerBound, Integer upperBound) Performs betweenIncluding.protected final intcheckBounds(Integer lowerBound, Integer upperBound) protected intPerforms compare.next()Performs next.protected IntegerPerforms next.protected IntegerPerforms next.protected IntegernextIncluding(Integer upperBound) Returns next Including.protected IntegernextIncluding(Integer lowerBound, Integer upperBound) Returns next Including.stream()Performs stream.Performs upTo.upToIncluding(Integer upperBound) Performs upToIncluding.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.midheaven.math.IntervalRandomGenerator
between, upToMethods inherited from interface org.midheaven.math.RandomGenerator
generateNext
-
Method Details
-
nextIncluding
Returns next Including.- Parameters:
upperBound- the upperBound value- Returns:
- the result of nextIncluding
-
nextIncluding
Returns next Including.- Parameters:
lowerBound- the lowerBound valueupperBound- the upperBound value- Returns:
- the result of nextIncluding
-
next
Performs next.- Parameters:
upperBound- the upperBound value- Returns:
- the result of next
-
next
Performs next.- Parameters:
lowerBound- the lowerBound valueupperBound- the upperBound value- Returns:
- the result of next
-
compare
Performs compare.- Parameters:
a- the a valueb- the b value- Returns:
- the result of compare
-
next
Performs next.- Specified by:
nextin interfaceRandomGenerator<Integer>- Returns:
- the result of next
-
stream
Performs stream.- Specified by:
streamin interfaceRandomGenerator<Integer>- Returns:
- the result of stream
-
upToIncluding
Description copied from interface:DiscreteIntervalRandomGeneratorPerforms upToIncluding.- Specified by:
upToIncludingin interfaceDiscreteIntervalRandomGenerator<T>- Parameters:
upperBound- the upperBound value- Returns:
- the result of upToIncluding
-
betweenIncluding
Description copied from interface:DiscreteIntervalRandomGeneratorPerforms betweenIncluding.- Specified by:
betweenIncludingin interfaceDiscreteIntervalRandomGenerator<T>- Parameters:
lowerBound- the lowerBound valueupperBound- the upperBound value- Returns:
- the result of betweenIncluding
-
upTo
Description copied from interface:IntervalRandomGeneratorPerforms upTo.- Specified by:
upToin interfaceIntervalRandomGenerator<T>- Parameters:
upperBound- the upperBound value- Returns:
- the result of upTo
-
between
Description copied from interface:IntervalRandomGeneratorPerforms between.- Specified by:
betweenin interfaceIntervalRandomGenerator<T>- Parameters:
lowerBound- the lowerBound valueupperBound- the upperBound value- Returns:
- the result of between
-
checkBounds
-
base
Performs base.- Returns:
- the result of base
-