Record Class NumericVariationScope
java.lang.Object
java.lang.Record
com.amalgamasimulation.studies.core.NumericVariationScope
- All Implemented Interfaces:
VariationScope<Double>
public record NumericVariationScope(double minValue, double maxValue, double step)
extends Record
implements VariationScope<Double>
-
Constructor Summary
ConstructorsConstructorDescriptionNumericVariationScope(double minValue, double maxValue, double step) Creates an instance of aNumericVariationScoperecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.doublemaxValue()Returns the value of themaxValuerecord component.doubleminValue()Returns the value of theminValuerecord component.doublestep()Returns the value of thesteprecord component.final StringtoString()Returns a string representation of this record class.values()
-
Constructor Details
-
NumericVariationScope
public NumericVariationScope(double minValue, double maxValue, double step) Creates an instance of aNumericVariationScoperecord class.- Parameters:
minValue- the value for theminValuerecord componentmaxValue- the value for themaxValuerecord componentstep- the value for thesteprecord component
-
-
Method Details
-
values
- Specified by:
valuesin interfaceVariationScope<Double>
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
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 '=='. -
minValue
public double minValue()Returns the value of theminValuerecord component.- Returns:
- the value of the
minValuerecord component
-
maxValue
public double maxValue()Returns the value of themaxValuerecord component.- Returns:
- the value of the
maxValuerecord component
-
step
public double step()Returns the value of thesteprecord component.- Returns:
- the value of the
steprecord component
-