Class CommandLineOptions

java.lang.Object
org.jtool.jxplatform.builder.CommandLineOptions

public class CommandLineOptions extends Object
Collects command-line options.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Creates an object that collects command-line options.
  • Method Summary

    Modifier and Type
    Method
    Description
    double
    get(String key, double defaultValue)
    Obtains the double for the option having a given key.
    float
    get(String key, float defaultValue)
    Obtains the float for the option having a given key.
    int
    get(String key, int defaultValue)
    Obtains the int value for the option having a given key.
    long
    get(String key, long defaultValue)
    Obtains the long value for the option having a given key.
    get(String key, String defaultValue)
    Obtains the string value for the option having a given key.

    Methods inherited from class java.lang.Object

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

    • CommandLineOptions

      public CommandLineOptions(String[] args)
      Creates an object that collects command-line options.
      Parameters:
      args - the command line parameters
  • Method Details

    • get

      public String get(String key, String defaultValue)
      Obtains the string value for the option having a given key.
      Parameters:
      key - the key for the option
      defaultValue - the specified default value
      Returns:
      the string value of the option
    • get

      public int get(String key, int defaultValue)
      Obtains the int value for the option having a given key.
      Parameters:
      key - the key for the option
      defaultValue - the specified default value
      Returns:
      the int value of the option
    • get

      public long get(String key, long defaultValue)
      Obtains the long value for the option having a given key.
      Parameters:
      key - the key for the option
      defaultValue - the specified default value
      Returns:
      the long value of the option
    • get

      public float get(String key, float defaultValue)
      Obtains the float for the option having a given key.
      Parameters:
      key - the key for the option
      defaultValue - the specified default value
      Returns:
      the floatvalue of the option
    • get

      public double get(String key, double defaultValue)
      Obtains the double for the option having a given key.
      Parameters:
      key - the key for the option
      defaultValue - the specified default value
      Returns:
      the double value of the option