Module watamebot

Class ProgramArguments

java.lang.Object
net.foxgenesis.util.ProgramArguments

@Deprecated(forRemoval=true) public class ProgramArguments extends Object
Deprecated, for removal: This API element is subject to removal in a future version.
Class to parse command line parameters.

Parsing code taken from https://stackoverflow.com/a/7341724

Author:
Ashley
  • Constructor Summary

    Constructors
    Constructor
    Description
    Deprecated, for removal: This API element is subject to removal in a future version.
    NEED_JAVADOC
    Deprecated, for removal: This API element is subject to removal in a future version.
    NEED_JAVADOC
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    Deprecated, for removal: This API element is subject to removal in a future version.
    NEED_JAVADOC
    void
    Deprecated, for removal: This API element is subject to removal in a future version.
    NEED_JAVADOC
    int
    Deprecated, for removal: This API element is subject to removal in a future version.
    NEED_JAVADOC
    Deprecated, for removal: This API element is subject to removal in a future version.
    NEED_JAVADOC
    Deprecated, for removal: This API element is subject to removal in a future version.
    Get the value of parameter key.
    Deprecated, for removal: This API element is subject to removal in a future version.
    NEED_JAVADOC
    boolean
    Deprecated, for removal: This API element is subject to removal in a future version.
    Check if the program arguments contains the flag "--key".
    boolean
    Deprecated, for removal: This API element is subject to removal in a future version.
    Check if the program arguments contains the parameter "-key".
    int
    Deprecated, for removal: This API element is subject to removal in a future version.
    NEED_JAVADOC
    void
    parse(String[] args)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Parse the given arguments into flags, parameters and arguments.
    Deprecated, for removal: This API element is subject to removal in a future version.
    NEED_JAVADOC

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • ProgramArguments

      public ProgramArguments()
      Deprecated, for removal: This API element is subject to removal in a future version.
      NEED_JAVADOC
      See Also:
    • ProgramArguments

      public ProgramArguments(String[] args)
      Deprecated, for removal: This API element is subject to removal in a future version.
      NEED_JAVADOC
      Parameters:
      args - - program arguments to parse
      See Also:
  • Method Details

    • parse

      public void parse(String[] args)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Parse the given arguments into flags, parameters and arguments.
      Parameters:
      args - - program arguments to parse
    • argumentCount

      public int argumentCount()
      Deprecated, for removal: This API element is subject to removal in a future version.
      NEED_JAVADOC
      Returns:
    • flagCount

      public int flagCount()
      Deprecated, for removal: This API element is subject to removal in a future version.
      NEED_JAVADOC
      Returns:
    • parameterCount

      public int parameterCount()
      Deprecated, for removal: This API element is subject to removal in a future version.
      NEED_JAVADOC
      Returns:
    • hasFlag

      public boolean hasFlag(String key)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Check if the program arguments contains the flag "--key".
      Parameters:
      key - - flag to check
      Returns:
      returns true if the arguments contains the flag
    • hasParameter

      public boolean hasParameter(String key)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Check if the program arguments contains the parameter "-key".
      Parameters:
      key - - parameter to check
      Returns:
      returns true if the arguments contains the parameter
    • getParameter

      public String getParameter(String key)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Get the value of parameter key.
      Parameters:
      key - - The parameter key
      Returns:
      Returns the value of parameter key.
      Throws:
      NullPointerException - Thrown if parameter list does not contain the key.
      See Also:
    • getParameters

      public Map<String,String> getParameters()
      Deprecated, for removal: This API element is subject to removal in a future version.
      NEED_JAVADOC
      Returns:
    • getArguments

      public List<String> getArguments()
      Deprecated, for removal: This API element is subject to removal in a future version.
      NEED_JAVADOC
      Returns:
    • clear

      public void clear()
      Deprecated, for removal: This API element is subject to removal in a future version.
      NEED_JAVADOC
    • toString

      public String toString()
      Deprecated, for removal: This API element is subject to removal in a future version.
      NEED_JAVADOC
      Overrides:
      toString in class Object