Package org.robovm.apple.gameplaykit
Class GKRandomDistribution
- java.lang.Object
-
- org.robovm.rt.bro.NativeObject
-
- org.robovm.objc.ObjCObject
-
- org.robovm.apple.foundation.NSObject
-
- org.robovm.apple.gameplaykit.GKRandomDistribution
-
- All Implemented Interfaces:
NSObjectProtocol
,GKRandom
,org.robovm.objc.ObjCProtocol
- Direct Known Subclasses:
GKGaussianDistribution
,GKShuffledDistribution
public class GKRandomDistribution extends NSObject implements GKRandom
- Since:
- Available in iOS 9.0 and later.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
GKRandomDistribution.GKRandomDistributionPtr
-
Nested classes/interfaces inherited from class org.robovm.apple.foundation.NSObject
NSObject.Handle, NSObject.Marshaler, NSObject.NoRetainMarshaler, NSObject.NSKeyValueObserver, NSObject.NSObjectPtr, NSObject.SkipInit
-
-
Field Summary
-
Fields inherited from class org.robovm.apple.foundation.NSObject
FLAG_NO_RETAIN
-
-
Constructor Summary
Constructors Modifier Constructor Description GKRandomDistribution()
GKRandomDistribution(long lowestInclusive, long highestInclusive)
protected
GKRandomDistribution(NSObject.Handle h, long handle)
protected
GKRandomDistribution(NSObject.SkipInit skipInit)
GKRandomDistribution(GKRandom source, long lowestInclusive, long highestInclusive)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected static long
create(long lowestInclusive, long highestInclusive)
static GKRandomDistribution
d20()
static GKRandomDistribution
d6()
static GKRandomDistribution
die(long sideCount)
long
getHighestValue()
long
getLowestValue()
long
getNumberOfPossibleOutcomes()
protected long
init(GKRandom source, long lowestInclusive, long highestInclusive)
boolean
nextBool()
long
nextInt()
long
nextInt(long upperBound)
float
nextUniform()
-
Methods inherited from class org.robovm.apple.foundation.NSObject
addKeyValueObserver, addKeyValueObserver, afterMarshaled, alloc, autorelease, autorelease, awakeFromNib, conformsToProtocol, copy, description, didChangeValue, didChangeValue, didChangeValues, doDispose, equals, forceSkipInit, getAutoContentAccessingProxy, getClassForCoder, getClassForKeyedArchiver, getKeyValueCoder, getObservationInfo, hash, hashCode, init, isEqual, isKindOfClass, isMemberOfClass, mutableCopy, performSelector, performSelector, performSelector, performSelector, performSelector, performSelector, performSelector, performSelectorInBackground, performSelectorOnMainThread, performSelectorOnMainThread, performSelectorV, performSelectorV, performSelectorV, release, release, removeKeyValueObserver, removeKeyValueObservers, respondsToSelector, retain, retain, retainCount, setObservationInfo, toString, willChangeValue, willChangeValue, willChangeValues
-
-
-
-
Constructor Detail
-
GKRandomDistribution
public GKRandomDistribution()
-
GKRandomDistribution
protected GKRandomDistribution(NSObject.Handle h, long handle)
-
GKRandomDistribution
protected GKRandomDistribution(NSObject.SkipInit skipInit)
-
GKRandomDistribution
public GKRandomDistribution(GKRandom source, long lowestInclusive, long highestInclusive)
-
GKRandomDistribution
public GKRandomDistribution(long lowestInclusive, long highestInclusive)
-
-
Method Detail
-
getLowestValue
public long getLowestValue()
-
getHighestValue
public long getHighestValue()
-
getNumberOfPossibleOutcomes
public long getNumberOfPossibleOutcomes()
-
init
protected long init(GKRandom source, long lowestInclusive, long highestInclusive)
-
nextUniform
public float nextUniform()
- Specified by:
nextUniform
in interfaceGKRandom
-
create
protected static long create(long lowestInclusive, long highestInclusive)
-
die
public static GKRandomDistribution die(long sideCount)
-
d6
public static GKRandomDistribution d6()
-
d20
public static GKRandomDistribution d20()
-
-