Class CommandArgument<V>

  • Type Parameters:
    V - the type of the argument.

    public class CommandArgument<V>
    extends Object
    Represents a command argument.
    • Method Detail

      • ofString

        @NotNull
        @Contract(value=" -> new",
                  pure=true)
        public static CommandArgument<String> ofString()
        Represent an unknown String CommandArgument Note: this argument indicates this position need a String value.
        Returns:
        the CommandArgument representing an unknown String
      • ofLong

        @NotNull
        @Contract(value=" -> new",
                  pure=true)
        public static CommandArgument<Long> ofLong()
        Represent an unknown Long CommandArgument Note: this argument indicates this position need a Long value.
        Returns:
        the CommandArgument representing an unknown Long
      • ofInt

        @NotNull
        @Contract(value=" -> new",
                  pure=true)
        public static CommandArgument<Integer> ofInt()
        Represents an unknown Int CommandArgument Note: this argument indicates this position need an Int value.
        Returns:
        the CommandArgument representing an unknown Int
      • of

        @NotNull
        @Contract(value="_ -> new",
                  pure=true)
        public static <V> CommandArgument<V> of​(DataConverter<V> defaultDataConverter)
        Represents an unknown CommandArgument with a specific DataConverter Note: this argument indicates this position need a V type value
        Type Parameters:
        V - the type of the argument.
        Parameters:
        defaultDataConverter - the DataConverter
        Returns:
        the CommandArgument representing an unknown CommandArgument with a specific DataConverter
      • of

        @NotNull
        public static CommandArgument<String> of​(@NotNull
                                                 String value)
        Represents a CommandArgument with a specific String value Note: this argument indicates this position is a known String value.
        Parameters:
        value - the String value of the CommandArgument
        Returns:
        the CommandArgument with a specific String value
      • of

        @NotNull
        public static <V> CommandArgument<V> of​(@NotNull
                                                DataConverter<V> dataConverter,
                                                @NotNull
                                                V value)
        Represents a CommandArgument with a specific value Note: this argument indicates this position is a known V value.
        Type Parameters:
        V - the type of the argument.
        Parameters:
        dataConverter - the DataConverter
        value - the value of the CommandArgument
        Returns:
        the CommandArgument with a specific value
      • ofNullable

        @NotNull
        public static <V> CommandArgument<V> ofNullable​(@NotNull
                                                        DataConverter<V> dataConverter)
        Represents a nullable CommandArgument with a specific DataConverter Note: this argument indicates this position is a nullable value.
        Type Parameters:
        V - the type of the argument.
        Parameters:
        dataConverter - the DataConverter
        Returns:
        the nullable CommandArgument with a specific DataConverter