Class Args

java.lang.Object
io.jenetics.internal.util.Args

public class Args extends Object
Helper class for parsing command line arguments.
Since:
3.4
Version:
3.4
  • Method Details

    • arg

      public Optional<String> arg(String name)
      Return the parameter with the given name.
      Parameters:
      name - the parameter name
      Returns:
      the parameter with the given name, if any
    • intArg

      public Optional<Integer> intArg(String name)
      Return the int-argument with the given name.
      Parameters:
      name - the argument name
      Returns:
      the int argument value, if any
    • intArgs

      public ISeq<Integer> intArgs(String name)
    • longArg

      public Optional<Long> longArg(String name)
      Return the long-argument with the given name.
      Parameters:
      name - the argument name
      Returns:
      the long argument value, if any
    • doubleArg

      public Optional<Double> doubleArg(String name)
      Return the double-argument with the given name.
      Parameters:
      name - the argument name
      Returns:
      the double argument value, if any
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • of

      public static Args of(String[] args)
      Wraps the given argument array into an Args object.
      Parameters:
      args - the underlying command line arguments
      Returns:
      the wrapped argument object