Package com.yahoo.schema.derived
Record Class IndexInfo.IndexCommand
java.lang.Object
java.lang.Record
com.yahoo.schema.derived.IndexInfo.IndexCommand
- Enclosing class:
- IndexInfo
An index command. Null commands are also represented, to detect consistency issues. This is an (immutable) value
object.
-
Constructor Summary
ConstructorDescriptionIndexCommand
(String index, String command) Creates an instance of aIndexCommand
record class. -
Method Summary
Modifier and TypeMethodDescriptioncommand()
Returns the value of thecommand
record component.boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.index()
Returns the value of theindex
record component.boolean
isNull()
Returns true if this is the null command (do nothing)toString()
Returns a string representation of this record class.
-
Constructor Details
-
IndexCommand
Creates an instance of aIndexCommand
record class.- Parameters:
index
- the value for theindex
record componentcommand
- the value for thecommand
record component
-
-
Method Details
-
isNull
public boolean isNull()Returns true if this is the null command (do nothing) -
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)
. -
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. -
index
Returns the value of theindex
record component.- Returns:
- the value of the
index
record component
-
command
Returns the value of thecommand
record component.- Returns:
- the value of the
command
record component
-