Record Class RngStreamState
java.lang.Object
java.lang.Record
com.knezevic.edaf.v3.core.rng.RngStreamState
- All Implemented Interfaces:
Serializable
public record RngStreamState(long state, boolean hasGaussian, double gaussian)
extends Record
implements Serializable
Serializable state snapshot for a single named RNG stream.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionRngStreamState(long state, boolean hasGaussian, double gaussian) Creates an instance of aRngStreamStaterecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.doublegaussian()Returns the value of thegaussianrecord component.booleanReturns the value of thehasGaussianrecord component.final inthashCode()Returns a hash code value for this object.longstate()Returns the value of thestaterecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
RngStreamState
public RngStreamState(long state, boolean hasGaussian, double gaussian) Creates an instance of aRngStreamStaterecord class.- Parameters:
state- the value for thestaterecord componenthasGaussian- the value for thehasGaussianrecord componentgaussian- the value for thegaussianrecord component
-
-
Method Details
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with thecomparemethod from their corresponding wrapper classes. -
state
public long state()Returns the value of thestaterecord component.- Returns:
- the value of the
staterecord component
-
hasGaussian
public boolean hasGaussian()Returns the value of thehasGaussianrecord component.- Returns:
- the value of the
hasGaussianrecord component
-
gaussian
public double gaussian()Returns the value of thegaussianrecord component.- Returns:
- the value of the
gaussianrecord component
-