Package com.io7m.cardant.model
Record Class CAMonetaryRange
java.lang.Object
java.lang.Record
com.io7m.cardant.model.CAMonetaryRange
- Record Components:
lower- The lower boundupper- The upper bound
An inclusive range of monetary values.
-
Constructor Summary
ConstructorsConstructorDescriptionCAMonetaryRange(BigDecimal lower, BigDecimal upper) An inclusive range of monetary values. -
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.lower()Returns the value of thelowerrecord component.final StringtoString()Returns a string representation of this record class.upper()Returns the value of theupperrecord component.
-
Constructor Details
-
CAMonetaryRange
An inclusive range of monetary values.- Parameters:
lower- The lower boundupper- The upper bound
-
-
Method Details
-
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). -
lower
Returns the value of thelowerrecord component.- Returns:
- the value of the
lowerrecord component
-
upper
Returns the value of theupperrecord component.- Returns:
- the value of the
upperrecord component
-