Record Class SymbolEquivalenceClass<T>
java.lang.Object
java.lang.Record
tools.refinery.store.model.internal.SymbolEquivalenceClass<T>
-
Constructor Summary
ConstructorDescriptionSymbolEquivalenceClass
(int arity, Class<T> valueType, T defaultValue) Creates an instance of aSymbolEquivalenceClass
record class.SymbolEquivalenceClass
(Symbol<T> symbol) -
Method Summary
Modifier and TypeMethodDescriptionint
arity()
Returns the value of thearity
record component.Returns the value of thedefaultValue
record component.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.final String
toString()
Returns a string representation of this record class.Returns the value of thevalueType
record component.
-
Constructor Details
-
SymbolEquivalenceClass
-
SymbolEquivalenceClass
Creates an instance of aSymbolEquivalenceClass
record class.- Parameters:
arity
- the value for thearity
record componentvalueType
- the value for thevalueType
record componentdefaultValue
- the value for thedefaultValue
record component
-
-
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. Reference components are compared withObjects::equals(Object,Object)
; primitive components are compared with '=='. -
arity
public int arity()Returns the value of thearity
record component.- Returns:
- the value of the
arity
record component
-
valueType
Returns the value of thevalueType
record component.- Returns:
- the value of the
valueType
record component
-
defaultValue
Returns the value of thedefaultValue
record component.- Returns:
- the value of the
defaultValue
record component
-