Class CLOptionDescriptor

  • All Implemented Interfaces:

    
    public final class CLOptionDescriptor
    
                        

    Basic class describing an type of option. Typically, one creates a static array of CLOptionDescriptors, and passes it to CLArgsParser.

    • Constructor Detail

      • CLOptionDescriptor

        CLOptionDescriptor(String name, int flags, int id, String description)
        Constructor.
        Parameters:
        name - the name/long option
        flags - the flags
        id - the id/character option
        description - description of option usage
      • CLOptionDescriptor

        CLOptionDescriptor(String name, int flags, int id, String description, Array<CLOptionDescriptor> incompatible)
        Constructor.
        Parameters:
        name - the name/long option
        flags - the flags
        id - the id/character option
        description - description of option usage
        incompatible - descriptors for incompatible options
    • Method Detail

      • getId

         final int getId()

        Retrieve the id for option. The id is also the character if using single character options.

        Returns:

        the id

      • getFlags

         final int getFlags()

        Retrieve flags about option. Flags include details such as whether it allows parameters etc.

        Returns:

        the flags

      • getName

         final String getName()

        Retrieve name of option which is also text for long option.

        Returns:

        name/long option

      • getDescription

         final String getDescription()

        Retrieve textual description.

        Returns:

        the description