Interface ICommandArgument


public interface ICommandArgument
A ICommandArgument is an immutable object representing one command argument. It contains data on the index of that argument, its value, and the rest of the string that argument was found in

You're recommended to use IArgConsumer}s to handle these.

Since:
10/2/2019
Author:
Brady
  • Method Summary

    Modifier and Type
    Method
    Description
    <T> T
    getAs(Class<T> type)
    Tries to use a stateless IArgParser to parse this argument into the specified class
    <T, S> T
    getAs(Class<T> type, Class<S> stateType, S state)
    Tries to use a stated IArgParser to parse this argument into the specified class
    <E extends Enum<?>>
    E
    getEnum(Class<E> enumClass)
    Gets an enum value from the enum class with the same name as this argument's value
    int
     
     
     
    <T> boolean
    is(Class<T> type)
    Tries to use a stateless IArgParser to parse this argument into the specified class
    <T, S> boolean
    is(Class<T> type, Class<S> stateType, S state)
    Tries to use a stated IArgParser to parse this argument into the specified class