Interface Container

    • Method Detail

      • addHelp

        void addHelp​(String name,
                     String desc)
        Stores the help for the given name if valid name.
        Parameters:
        name - the name to store the help under
        desc - the help description
      • addHelp

        void addHelp​(String name,
                     String desc,
                     Class type)
        Stores the help for the given name if valid name.
        Parameters:
        name - the name to store the help under
        desc - the help description
        type - the type of the data
      • addHelp

        void addHelp​(String name,
                     String desc,
                     Class[] types)
        Stores the help for the given name if valid name.
        Parameters:
        name - the name to store the help under
        desc - the help description
        types - the types of the data
      • names

        Iterator<String> names()
        Returns all value names that can be used (theoretically).
        Returns:
        iterator over all possible value names
      • stored

        Iterator<String> stored()
        Returns all available stored value names.
        Returns:
        enumeration over all stored value names
      • hasValue

        boolean hasValue​(String name)
        Checks whether a given value is non-null.
        Parameters:
        name - the name of the value to check
        Returns:
        true if the value is non-null
      • getValue

        Object getValue​(String name)
        Returns the value associated with the given name.
        Parameters:
        name - the name of the value
        Returns:
        the associated value or null if not available
      • getValue

        <T> T getValue​(String name,
                       Class<T> cls)
        Returns the value associated with the given name.
        Parameters:
        name - the name of the value
        cls - for casting
        Returns:
        the associated value or null if not available
      • hasHelp

        boolean hasHelp​(String name)
        Checks whether a given help is non-null.
        Parameters:
        name - the name of the help item to check
        Returns:
        true if the help is non-null
      • getHelp

        String getHelp​(String name)
        Returns the help associated with the given name.
        Parameters:
        name - the name of the help item
        Returns:
        the associated help or null if not available
      • setValue

        boolean setValue​(String name,
                         Object value)
        Sets the named value.
        Parameters:
        name - the name of the value
        value - the value to store in the container
        Returns:
        true if the name was recognized and the value was stored successfully, false otherwise
      • isValid

        boolean isValid()
        Checks whether the setup of the container is valid.
        Returns:
        true if all the necessary values are available
      • addAdditionalName

        boolean addAdditionalName​(String name)
        Adds the specified name as valid name for a value.
        Parameters:
        name - the name to add
        Returns:
        true if the additional names list changed
      • removeAdditionalName

        boolean removeAdditionalName​(String name)
        Removes the additional name again.
        Parameters:
        name - the name to remove
        Returns:
        true if the name was present and got removed
      • toString

        String toString()
        Returns a short description of the stored data.
        Overrides:
        toString in class Object
        Returns:
        short description