Package com.darkcollective.relix.value
Record Class StringValue
java.lang.Object
java.lang.Record
com.darkcollective.relix.value.StringValue
- Record Components:
value- the string content; must not benull
- All Implemented Interfaces:
Value
A runtime string value.
-
Constructor Summary
ConstructorsConstructorDescriptionStringValue(String value) Creates an instance of aStringValuerecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns a human-readable display string for this value, suitable for output formatting.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanisNull()Returnstrueif this value is null (absent).final StringtoString()Returns a string representation of this record class.type()Returns theScalarTypethat describes this value's kind.value()Returns the value of thevaluerecord component.
-
Constructor Details
-
StringValue
Creates an instance of aStringValuerecord class.- Parameters:
value- the value for thevaluerecord component
-
-
Method Details
-
isNull
public boolean isNull()Description copied from interface:ValueReturnstrueif this value is null (absent). -
type
Description copied from interface:Value -
asDisplayString
Description copied from interface:ValueReturns a human-readable display string for this value, suitable for output formatting.NullValuereturns"NULL".- Specified by:
asDisplayStringin interfaceValue- Returns:
- display string; never
null
-
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
-