Package org.appng.api

Interface Options

    • Method Detail

      • getOptionNames

        Set<String> getOptionNames()
        Returns the names of all available Options
        Returns:
        the names of all available Options
      • hasOption

        boolean hasOption​(String name)
        Checks whether there is an Option with the given name.
        Parameters:
        name - the name of the Option to check
        Returns:
        true there is an Option with the given name, false otherwise
      • getOption

        Option getOption​(String name)
        Returns the Option with the given name, if present.
        Parameters:
        name - the name of the Option to get
        Returns:
        the Option with the given name, if present, null otherwise
      • getOptionValue

        String getOptionValue​(String name,
                              String attribute)
        Returns the attribute with the given name for the Option with the given name.
        Parameters:
        name - the name of the Option to get the attribute from
        attribute - the name of the attribute of the Option
        Returns:
        the attribute with the given name, or null if either the Option or the attribute does not exist
      • getString

        String getString​(String name,
                         String attribute)
        Returns the attribute with the given name for the Option with the given name.
        Parameters:
        name - the name of the Option to get the attribute from
        attribute - the name of the attribute of the Option
        Returns:
        the attribute with the given name, or null if either the Option or the attribute does not exist
      • getInteger

        Integer getInteger​(String name,
                           String attribute)
        Returns an Integer parsed from the attribute with the given name for the Option with the given name.
        Parameters:
        name - the name of the Option to get the attribute from
        attribute - the name of the attribute of the Option
        Returns:
        the integer value, or null if either the Option or the attribute does not exist or the or the value can not be parsed to an integer
      • getBoolean

        Boolean getBoolean​(String name,
                           String attribute)
        Returns a Boolean parsed from the attribute with the given name for the Option with the given name.
        Parameters:
        name - the name of the Option to get the attribute from
        attribute - the name of the attribute of the Option
        Returns:
        Boolean.TRUE if the value of the attribute equals to (ignoring case) true, Boolean.FALSE otherwise (also if no such Option exists)
      • getEnum

        <E extends Enum<E>> E getEnum​(String name,
                                      String attribute,
                                      Class<E> type)
        Returns the Enum constant of the given type represented by the attribute with the given name for the Option with the given name.
        Parameters:
        name - the name of the Option to get the attribute from
        attribute - the name of the attribute of the Option
        Returns:
        the enum constant, if the (upper-case) attribute value represents a valid enum of the given type, null otherwise (also if no such Option exists)