Record Class HashedKey
java.lang.Object
java.lang.Record
com.inductiveautomation.ignition.common.i18n.translation.HashedKey
- Record Components:
original- The original source key.computedHash- The hash code computed from the normalized version of the original key.
A record that pairs an original source key with its computed hash based on a
KeyHashRule.-
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.static HashedKeyofPreHashed(String original, String adapted) Constructs a new HashedKey given a raw input key and the corresponding string that was already hashed.original()Returns the value of theoriginalrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
HashedKey
Creates an instance of aHashedKeyrecord class.- Parameters:
original- the value for theoriginalrecord componentcomputedHash- the value for thecomputedHashrecord component
-
-
Method Details
-
ofPreHashed
Constructs a new HashedKey given a raw input key and the corresponding string that was already hashed.- Parameters:
original- The original source key.adapted- The input string that's already been adapted viaKeyHashRule.getKey(String).
-
getSourceKey
-
hashCode
-
toString
-
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 thecomparemethod from their corresponding wrapper classes. -
original
-
computedHash
public int computedHash()Returns the value of thecomputedHashrecord component.- Returns:
- the value of the
computedHashrecord component
-