Record Class LtDistanceConstraint
java.lang.Object
java.lang.Record
net.amygdalum.allotropy.fluent.distances.LtDistanceConstraint
- All Implemented Interfaces:
Predicate<Distance>,Constraint<Distance>,DistanceConstraint,Precisable<DistanceConstraint>
public record LtDistanceConstraint(Precision precision, Distance distance)
extends Record
implements DistanceConstraint
-
Field Summary
Fields inherited from interface net.amygdalum.allotropy.fluent.distances.DistanceConstraint
NONE -
Constructor Summary
ConstructorsConstructorDescriptionLtDistanceConstraint(Precision precision, Distance distance) Creates an instance of aLtDistanceConstraintrecord class. -
Method Summary
Modifier and TypeMethodDescriptiondistance()Returns the value of thedistancerecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.static LtDistanceConstraintReturns the value of theprecisionrecord component.booleanfinal StringtoString()Returns a string representation of this record class.withPrecision(Precision precision)
-
Constructor Details
-
LtDistanceConstraint
Creates an instance of aLtDistanceConstraintrecord class.- Parameters:
precision- the value for theprecisionrecord componentdistance- the value for thedistancerecord component
-
-
Method Details
-
lt
-
test
-
withPrecision
- Specified by:
withPrecisionin interfacePrecisable<DistanceConstraint>
-
description
- Specified by:
descriptionin interfaceConstraint<Distance>
-
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 withObjects::equals(Object,Object). -
precision
Returns the value of theprecisionrecord component.- Returns:
- the value of the
precisionrecord component
-
distance
Returns the value of thedistancerecord component.- Returns:
- the value of the
distancerecord component
-