Record Class Hash.HashFunction
java.lang.Object
java.lang.Record
org.elasticsearch.xpack.esql.expression.function.scalar.string.Hash.HashFunction
- Enclosing class:
Hash
-
Constructor Summary
ConstructorsConstructorDescriptionHashFunction(String algorithm, MessageDigest digest) Creates an instance of aHashFunctionrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thealgorithmrecord component.copy()static Hash.HashFunctionstatic Hash.HashFunctioncreate(org.apache.lucene.util.BytesRef literal) digest()Returns the value of thedigestrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.toString()Returns a string representation of this record class.
-
Constructor Details
-
HashFunction
Creates an instance of aHashFunctionrecord class.- Parameters:
algorithm- the value for thealgorithmrecord componentdigest- the value for thedigestrecord component
-
-
Method Details
-
create
-
create
public static Hash.HashFunction create(org.apache.lucene.util.BytesRef literal) throws NoSuchAlgorithmException - Throws:
NoSuchAlgorithmException
-
copy
-
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). -
algorithm
Returns the value of thealgorithmrecord component.- Returns:
- the value of the
algorithmrecord component
-
digest
Returns the value of thedigestrecord component.- Returns:
- the value of the
digestrecord component
-