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
ConstructorsConstructorDescriptionIndexCommand(String index, String command) Creates an instance of aIndexCommandrecord class. -
Method Summary
Modifier and TypeMethodDescriptioncommand()Returns the value of thecommandrecord component.booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.index()Returns the value of theindexrecord component.booleanisNull()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 aIndexCommandrecord class.- Parameters:
index- the value for theindexrecord componentcommand- the value for thecommandrecord 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 theindexrecord component.- Returns:
- the value of the
indexrecord component
-
command
Returns the value of thecommandrecord component.- Returns:
- the value of the
commandrecord component
-