Record Class PropertyHints
java.lang.Object
java.lang.Record
com.wualabs.qtsurfer.engine.core.PropertyHints
- Record Components:
min- the suggested minimum, orDouble.NaNif unsetmax- the suggested maximum, orDouble.NaNif unsetstep- the suggested step/resolution, orDouble.NaNif unset
Optional numeric range hints for a
PropertyInfo: a suggested minimum,
maximum and step for the property value. These are purely advisory metadata
consumed by callers that introspect sweepable properties (parameter sweeps,
UI range pre-fills); they do not constrain or validate the property value.
A hint is "present" when it is a finite number. The sentinel for an absent
hint is Double.NaN, which lets every existing annotation/registration
keep working without specifying hints. Use NONE for "no hints".
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final PropertyHintsShared instance representing the absence of any hint. -
Constructor Summary
ConstructorsConstructorDescriptionPropertyHints(double min, double max, double step) Creates an instance of aPropertyHintsrecord 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.booleanhasMax()booleanhasMin()booleanhasStep()booleanisEmpty()True if none of the three hints is present.doublemax()Returns the value of themaxrecord component.doublemin()Returns the value of theminrecord component.static PropertyHintsof(double min, double max, double step) Builds aPropertyHints, normalizing to the sharedNONEinstance when no hint is present (all three values absent).doublestep()Returns the value of thesteprecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
NONE
Shared instance representing the absence of any hint.
-
-
Constructor Details
-
PropertyHints
-
-
Method Details
-
of
Builds aPropertyHints, normalizing to the sharedNONEinstance when no hint is present (all three values absent). -
isEmpty
public boolean isEmpty()True if none of the three hints is present. -
hasMin
public boolean hasMin() -
hasMax
public boolean hasMax() -
hasStep
public boolean hasStep() -
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. -
min
-
max
-
step
-