ur_rna.Utilities

## Class CommandLineParser.ParseResults

- java.lang.Object
- - ur_rna.Utilities.CommandLineParser.ParseResults

- Enclosing class:
    CommandLineParser

      public static class CommandLineParser.ParseResults
      extends java.lang.Object

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `java.util.List<CommandLineParser.Argument>` | `arguments`
    `java.util.List<CommandLineParser.FlagArg>` | `flags`
    `CommandLineParser` | `parser`
    `java.util.List<CommandLineParser.UnnamedArg>` | `unnamed`
    `private java.util.List<java.lang.String>` | `unnamedValues`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ParseResults(CommandLineParser parser, java.util.List<CommandLineParser.Argument> args)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `foundAllFlags(java.lang.String... flagNameList)`
    `CommandLineParser.FlagArg` | `getFlag(java.lang.String flagNameOrAlias)`
    `java.lang.String` | `getFlagValue(java.lang.String flagNameOrAlias)` Returns the value of the flag that matches the given name or alias.
    `java.util.List<java.lang.String>` | `getUnnamedValues()` Get the list of Unnamed Arguments (i.e.
    `boolean` | `hasAnyFlag(java.lang.String... flagNameList)` Returns true if any of the listed flags were found.
    `boolean` | `hasFlag(java.lang.String flagNameOrAlias)` Returns true if the specified flag was found.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### arguments

          public final java.util.List<CommandLineParser.Argument> arguments

    - #### flags

          public final java.util.List<CommandLineParser.FlagArg> flags

    - #### parser

          public final CommandLineParser parser

    - #### unnamed

          public final java.util.List<CommandLineParser.UnnamedArg> unnamed

    - #### unnamedValues

          private java.util.List<java.lang.String> unnamedValues

  - ### Constructor Detail

    - #### ParseResults

          public ParseResults(CommandLineParser parser,
                              java.util.List<CommandLineParser.Argument> args)

  - ### Method Detail

    - #### foundAllFlags

          public boolean foundAllFlags(java.lang.String... flagNameList)

    - #### getFlag

          public CommandLineParser.FlagArg getFlag(java.lang.String flagNameOrAlias)

    - #### getFlagValue

          public java.lang.String getFlagValue(java.lang.String flagNameOrAlias)

      Returns the value of the flag that matches the given name or alias.

      If `allowRepeats` is true for the flag, the value returned will be that of the first instance of the flag.

      If a parameter value is optional for this flag (i.e. if the { CommandLineParser.FlagDef#paramAffinity paramAffinity} of this flag is { CommandLineParser.ParamAffinity#OPTIONAL OPTIONAL}), you will not be able to use the return value to distinguish between a missing flag and a flag that is present but without a value, because `null` is returned in both cases. However, you can call `hasFlag(String)` to determine whether the flag was present or not.

      Parameters:
        `flagNameOrAlias` - The name of the flag to search for.
      Returns:
        The value of the flag that matches the given name, or null if no match is found.

    - #### getUnnamedValues

          @NotNull
          public java.util.List<java.lang.String> getUnnamedValues()

      Get the list of Unnamed Arguments (i.e. non-flag values) in the order they were listed on the command-line.
      Returns:
        A non-null list of ordered values.

    - #### hasAnyFlag

          public boolean hasAnyFlag(java.lang.String... flagNameList)

      Returns true if any of the listed flags were found.
      Parameters:
        `flagNameList` - The list of flags to search for.
      Returns:
        True if any of the listed flags were found or false otherwise.

    - #### hasFlag

          public boolean hasFlag(java.lang.String flagNameOrAlias)

      Returns true if the specified flag was found.
      Parameters:
        `flagNameOrAlias` - The name or one of the aliases the flag.
      Returns:
        True if the flag was found on the command-line or false otherwise.