Record Class CelExpr.KeyedBy<K>
java.lang.Object
java.lang.Record
com.google.mu.cel.CelExpr.KeyedBy<K>
- Enclosing interface:
CelExpr
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanReturns the value of theisOptionalrecord component.key()Returns the value of thekeyrecord component.intReturns the value of thesourceIndexrecord component.toString()Returns a string representation of this record class.value()Returns the value of thevaluerecord component.
-
Constructor Details
-
KeyedBy
Creates an instance of aKeyedByrecord class.- Parameters:
key- the value for thekeyrecord componentvalue- the value for thevaluerecord componentisOptional- the value for theisOptionalrecord componentsourceIndex- the value for thesourceIndexrecord component
-
KeyedBy
-
-
Method Details
-
toString
-
hashCode
-
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. -
key
Returns the value of thekeyrecord component.- Returns:
- the value of the
keyrecord component
-
value
Returns the value of thevaluerecord component.- Returns:
- the value of the
valuerecord component
-
isOptional
public boolean isOptional()Returns the value of theisOptionalrecord component.- Returns:
- the value of the
isOptionalrecord component
-
sourceIndex
public int sourceIndex()Returns the value of thesourceIndexrecord component.- Returns:
- the value of the
sourceIndexrecord component
-