Record Class ArgsModular<T>

java.lang.Object
java.lang.Record
org.aksw.shellgebra.shim.core.ArgsModular<T>
All Implemented Interfaces:
Args

public record ArgsModular<T>(T model, ArgumentListRenderer<? super T> renderer, Predicate<? super T> stdinTest) extends Record implements Args
  • Constructor Details

    • ArgsModular

      public ArgsModular(T model, ArgumentListRenderer<? super T> renderer, Predicate<? super T> stdinTest)
      Creates an instance of a ArgsModular record class.
      Parameters:
      model - the value for the model record component
      renderer - the value for the renderer record component
      stdinTest - the value for the stdinTest record component
  • Method Details

    • toArgList

      public ArgumentList toArgList()
      Specified by:
      toArgList in interface Args
    • of

      public static <T> Args of(T model, ArgumentListRenderer<? super T> renderer, Predicate<? super T> stdinTest)
    • readsStdin

      public Optional<Boolean> readsStdin()
      Boolean for whether the command is known to (not) read from stdin. An absent value means unknown. Engines are free to interpret an absent value as they see fit, log warnings or fail when encountering unknown values.
      Specified by:
      readsStdin in interface Args
    • toString

      public final 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.
    • model

      public T model()
      Returns the value of the model record component.
      Returns:
      the value of the model record component
    • renderer

      public ArgumentListRenderer<? super T> renderer()
      Returns the value of the renderer record component.
      Returns:
      the value of the renderer record component
    • stdinTest

      public Predicate<? super T> stdinTest()
      Returns the value of the stdinTest record component.
      Returns:
      the value of the stdinTest record component