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 TypeMethodDescriptionintReturns the value of thecomputedHashrecord component.final booleanIndicates whether some other object is "equal to" this one.inthashCode()Returns a hash code value for this object.original()Returns the value of theoriginalrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
TermKey
public TermKey()For serialization -
TermKey
-
TermKey
Creates an instance of aTermKeyrecord class.- Parameters:
original- the value for theoriginalrecord componentcomputedHash- the value for thecomputedHashrecord 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 theoriginalrecord component.- Returns:
- the value of the
originalrecord component
-
computedHash
public int computedHash()Returns the value of thecomputedHashrecord component.- Returns:
- the value of the
computedHashrecord component
-