Class StdinArgumentType

All Implemented Interfaces:
Parseable<String>, ErrorContainer<ArgumentTypeError>, NamedWithDescription, ParentElementGetter<ArgumentType<?>>, PostCreationInheritor<Command>, Resettable

public class StdinArgumentType extends ArgumentType<String>
An argument type that takes input from stdin (Standard Input). This waits for the user to input something. May be useful for piping input from other programs.
  • Constructor Details

    • StdinArgumentType

      public StdinArgumentType()
  • Method Details

    • getValueCountBounds

      @NotNull public @NotNull io.github.darvil.utils.Range getValueCountBounds()
      Description copied from interface: Parseable
      Specifies the number of values that this parser should receive when calling Parseable.parseValues(String[]). By default, this is 1. (Range.ONE).
    • getRepresentation

      public io.github.darvil.terminal.textformatter.TextFormatter getRepresentation()
      Description copied from interface: Parseable
      Returns the representation of this parseable type. This may appear in places like the help message.
    • parseValues

      public String parseValues(@NotNull @NotNull String @NotNull [] values)
      Description copied from interface: Parseable
      Parses the received values and returns the result. If the values are invalid, this method shall return null.
      Parameters:
      values - The values that were received.
      Returns:
      The parsed value.
    • getDescription

      @Nullable public @Nullable String getDescription()
      Description copied from interface: NamedWithDescription
      Returns the description of this object.
      Returns:
      The description of this object