- All Implemented Interfaces:
Parseable<String>,ErrorContainer<ArgumentTypeError>,NamedWithDescription,ParentElementGetter<ArgumentType<?>>,PostCreationInheritor<Command>,Resettable
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.
-
Nested Class Summary
Nested classes/interfaces inherited from class io.github.darvil.lanat.ArgumentType
ArgumentType.ParseStateSnapshot -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription@Nullable StringReturns the description of this object.io.github.darvil.terminal.textformatter.TextFormatterReturns the representation of this parseable type.@NotNull io.github.darvil.utils.RangeSpecifies the number of values that this parser should receive when callingParseable.parseValues(String[]).parseValues(@NotNull String @NotNull [] values) Parses the received values and returns the result.Methods inherited from class io.github.darvil.lanat.ArgumentType
addError, addError, addError, addError, addError, getArgValuesStream, getFinalValue, getInitialValue, getLastParseState, getParent, getValue, inheritProperties, onSubTypeError, parseAndUpdateValue, registerSubType, resetState, setInitialValue, unregisterSubTypeMethods inherited from class io.github.darvil.lanat.utils.errors.ErrorContainerImpl
getErrorDisplayThreshold, getErrorExitThreshold, getErrorsUnderDisplayThreshold, getErrorsUnderExitThreshold, getErrorsUnderThreshold, hasDisplayErrors, hasExitErrors, setErrorDisplayThreshold, setErrorExitThresholdMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.github.darvil.lanat.utils.ParentElementGetter
getRoot, isRootMethods inherited from interface io.github.darvil.lanat.argtypes.Parseable
getName, getUsageCountBounds
-
Constructor Details
-
StdinArgumentType
public StdinArgumentType()
-
-
Method Details
-
getValueCountBounds
@NotNull public @NotNull io.github.darvil.utils.Range getValueCountBounds()Description copied from interface:ParseableSpecifies the number of values that this parser should receive when callingParseable.parseValues(String[]). By default, this is 1. (Range.ONE). -
getRepresentation
public io.github.darvil.terminal.textformatter.TextFormatter getRepresentation()Description copied from interface:ParseableReturns the representation of this parseable type. This may appear in places like the help message. -
parseValues
Description copied from interface:ParseableParses the received values and returns the result. If the values are invalid, this method shall returnnull.- Parameters:
values- The values that were received.- Returns:
- The parsed value.
-
getDescription
Description copied from interface:NamedWithDescriptionReturns the description of this object.- Returns:
- The description of this object
-