Record Class IndexInfo.IndexCommand

java.lang.Object
java.lang.Record
com.yahoo.schema.derived.IndexInfo.IndexCommand
Enclosing class:
IndexInfo

public static record IndexInfo.IndexCommand(String index, String command) extends Record
An index command. Null commands are also represented, to detect consistency issues. This is an (immutable) value object.
  • Constructor Summary

    Constructors
    Constructor
    Description
    IndexCommand(String index, String command)
    Creates an instance of a IndexCommand record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the value of the command record component.
    boolean
    equals(Object object)
    Indicates whether some other object is "equal to" this one.
    final int
    Returns a hash code value for this object.
    Returns the value of the index record component.
    boolean
    Returns true if this is the null command (do nothing)
    Returns a string representation of this record class.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • IndexCommand

      public IndexCommand(String index, String command)
      Creates an instance of a IndexCommand record class.
      Parameters:
      index - the value for the index record component
      command - the value for the command record component
  • Method Details

    • isNull

      public boolean isNull()
      Returns true if this is the null command (do nothing)
    • equals

      public boolean equals(Object object)
      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 with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      object - the object with which to compare
      Returns:
      true if this object is the same as the object argument; false otherwise.
    • toString

      public String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • index

      public String index()
      Returns the value of the index record component.
      Returns:
      the value of the index record component
    • command

      public String command()
      Returns the value of the command record component.
      Returns:
      the value of the command record component