Record Class TermKey
java.lang.Object
java.lang.Record
com.inductiveautomation.ignition.common.i18n.translation.TermKey
- All Implemented Interfaces:
Serializable
This class lets us map source strings to hash table results using different types of rules. For example, we may
choose to ignore case or not. This works by having the source, plus a hash code computed based on our desired set of
rules.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionint
Returns the value of thecomputedHash
record component.final boolean
Indicates whether some other object is "equal to" this one.int
hashCode()
Returns a hash code value for this object.original()
Returns the value of theoriginal
record component.final String
toString()
Returns a string representation of this record class.
-
Constructor Details
-
TermKey
public TermKey()For serialization -
TermKey
-
TermKey
Creates an instance of aTermKey
record class.- Parameters:
original
- the value for theoriginal
record componentcomputedHash
- the value for thecomputedHash
record component
-
-
Method Details
-
getSourceTerm
-
hashCode
public int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
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. -
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 '=='. -
original
Returns the value of theoriginal
record component.- Returns:
- the value of the
original
record component
-
computedHash
public int computedHash()Returns the value of thecomputedHash
record component.- Returns:
- the value of the
computedHash
record component
-