Record Class Configured<T>
java.lang.Object
java.lang.Record
org.elasticsearch.xpack.esql.datasources.spi.Configured<T>
Carrier for "configure with this map" operations: a value plus the keys it consumed.
-
Constructor Summary
ConstructorsConstructorDescriptionConfigured(T value, Set<String> consumedKeys) Creates an instance of aConfiguredrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theconsumedKeysrecord component.static <T> Configured<T> empty(T value) final booleanIndicates whether some other object is "equal to" this one.static <T> Configured<T> Pairsvaluewith the subset ofconfig's keys that matchrecognized.final inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.value()Returns the value of thevaluerecord component.
-
Constructor Details
-
Configured
Creates an instance of aConfiguredrecord class.- Parameters:
value- the value for thevaluerecord componentconsumedKeys- the value for theconsumedKeysrecord component
-
-
Method Details
-
empty
-
fromKnownSubset
public static <T> Configured<T> fromKnownSubset(T value, Map<String, Object> config, Set<String> recognized) Pairsvaluewith the subset ofconfig's keys that matchrecognized. Equivalent to manually intersectingconfig.keySet()withrecognized— factored out so multiple format readers don't repeat the loop body. -
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). -
value
Returns the value of thevaluerecord component.- Returns:
- the value of the
valuerecord component
-
consumedKeys
Returns the value of theconsumedKeysrecord component.- Returns:
- the value of the
consumedKeysrecord component
-