Record Class CmdOpExec

java.lang.Object
java.lang.Record
org.aksw.shellgebra.algebra.cmd.op.CmdOpExec
All Implemented Interfaces:
CmdOp

public record CmdOpExec(List<CmdPrefix> prefixes, String name, ArgumentList args) extends Record implements CmdOp
  • Constructor Details

    • CmdOpExec

      public CmdOpExec(String name, CmdArg... args)
    • CmdOpExec

      public CmdOpExec(String name, ArgumentList args)
    • CmdOpExec

      public CmdOpExec(List<CmdPrefix> prefixes, String name, ArgumentList args)
      Creates an instance of a CmdOpExec record class.
      Parameters:
      prefixes - the value for the prefixes record component
      name - the value for the name record component
      args - the value for the args record component
  • Method Details

    • of

      public static CmdOpExec of(String name, CmdArg... args)
    • of

      public static CmdOpExec of(String name, List<CmdArg> args)
    • ofLiteralArgs

      public static CmdOpExec ofLiteralArgs(String... argv)
      Args array where the first element is the program name.
    • ofLiteralArgs

      public static CmdOpExec ofLiteralArgs(List<String> argv)
    • assign

      public static CmdOpExec assign(String key, String value)
    • ofLiterals

      public static CmdOpExec ofLiterals(String name, String... args)
      Create a CmdOpExec with all arguments interpreted as string literals.
      Parameters:
      name -
      args -
      Returns:
    • ofLiterals

      public static CmdOpExec ofLiterals(String name, List<String> args)
    • getName

      public String getName()
    • accept

      public <T> T accept(CmdOpVisitor<T> visitor)
      Specified by:
      accept in interface CmdOp
    • 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
    • equals

      public final boolean equals(Object o)
      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:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • prefixes

      public List<CmdPrefix> prefixes()
      Returns the value of the prefixes record component.
      Returns:
      the value of the prefixes record component
    • name

      public String name()
      Returns the value of the name record component.
      Returns:
      the value of the name record component
    • args

      public ArgumentList args()
      Returns the value of the args record component.
      Returns:
      the value of the args record component