Class IntListParam

All Implemented Interfaces:
OneArgParam, Param

public class IntListParam extends BasicOneArgParam<IntStream>
A parameter type that accepts lists of integers. The list can take comma-separated integers, as well as dots-separated ranges, and combinations of these. They will be combined into an `IntStream`. The ends of the ranges are inclusive. Example: 1,5..8,13 ==> 1,5,6,7,8,13
  • Constructor Details

  • Method Details

    • convertArg

      protected IntStream convertArg(String param, String arg) throws Exception
      Description copied from class: BasicOneArgParam
      A conversion method to get a T from a string. All subclasses must define this for the type they handle.
      Specified by:
      convertArg in class BasicOneArgParam<IntStream>
      Parameters:
      param - the name of the parameter found on the command line. In some cases it might affect conversion, but it is also good for error messages.
      arg - the argument to convert to a type T.
      Returns:
      the converted argument.
      Throws:
      Exception - if there is a problem with the conversion.