Package dev.omnist.document
Record Class Scalar.DateScalar
java.lang.Object
java.lang.Record
dev.omnist.document.Scalar.DateScalar
- Record Components:
value- the calendar date; nevernull
- Enclosing interface:
Scalar
A scalar holding a calendar date without a time component (omnist-spec ยง2.2.1, type
date).-
Nested Class Summary
Nested classes/interfaces inherited from interface dev.omnist.document.Scalar
Scalar.BooleanScalar, Scalar.DateScalar, Scalar.DateTimeScalar, Scalar.IntegerScalar, Scalar.NumberScalar, Scalar.StringScalar, Scalar.TimeScalarNested classes/interfaces inherited from interface dev.omnist.document.Value
Value.NullValue -
Field Summary
-
Constructor Summary
ConstructorsConstructorDescriptionDateScalar(LocalDate value) Creates an instance of aDateScalarrecord 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.kind()Returns theScalarKindidentifying which of the seven scalar types this value is.final StringtoString()Returns a string representation of this record class.value()Returns the value of thevaluerecord component.
-
Constructor Details
-
DateScalar
Creates an instance of aDateScalarrecord class.- Parameters:
value- the value for thevaluerecord component
-
-
Method Details
-
kind
Description copied from interface:ScalarReturns theScalarKindidentifying which of the seven scalar types this value is. Never returnsnull. -
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). -
value
Returns the value of thevaluerecord component.- Returns:
- the value of the
valuerecord component
-