Interface XAttributeInfo

  • All Known Implementing Classes:
    XAttributeInfoImpl

    public interface XAttributeInfo
    This interface defines an attribute information registry. Instances of this interface can be used to store aggregate information about the classes of attributes contained in a specific attributable type.
    Author:
    Christian W. Guenther (christian@deckfour.org)
    • Method Detail

      • getAttributes

        java.util.Collection<XAttribute> getAttributes()
        Provides access to prototypes of all registered attributes.
        Returns:
        A collection of attribute prototypes.
      • getAttributeKeys

        java.util.Collection<java.lang.String> getAttributeKeys()
        Provides access to prototypes of all registered attributes' keys.
        Returns:
        A collection of attribute keys.
      • getFrequency

        int getFrequency​(java.lang.String key)
        Returns the total frequency, i.e. number of occurrences, for the requested attribute.
        Parameters:
        key - Key of an attribute.
        Returns:
        Total frequency of that attribute as registered.
      • getFrequency

        int getFrequency​(XAttribute attribute)
        Returns the total frequency, i.e. number of occurrences, for the requested attribute.
        Parameters:
        attribute - An attribute.
        Returns:
        Total frequency of that attribute as registered.
      • getRelativeFrequency

        double getRelativeFrequency​(java.lang.String key)
        Returns the relative frequency, i.e. between 0 and 1, for the requested attribute.
        Parameters:
        key - Key of an attribute.
        Returns:
        Relative frequency of that attribute as registered.
      • getRelativeFrequency

        double getRelativeFrequency​(XAttribute attribute)
        Returns the relative frequency, i.e. between 0 and 1, for the requested attribute.
        Parameters:
        attribute - An attribute.
        Returns:
        Relative frequency of that attribute as registered.
      • getAttributesForType

        java.util.Collection<XAttribute> getAttributesForType​(java.lang.Class<? extends XAttribute> type)
        For a given type, returns prototypes of all registered attributes with that type.
        Parameters:
        type - Requested attribute type (type-specific attribute interface class).
        Returns:
        A collection of attribute prototypes registered for that type.
      • getKeysForType

        java.util.Collection<java.lang.String> getKeysForType​(java.lang.Class<? extends XAttribute> type)
        For a given type, returns the keys of all registered attributes with that type.
        Parameters:
        type - Requested attribute type (type-specific attribute interface class).
        Returns:
        A collection of attribute keys registered for that type.
      • getAttributesForExtension

        java.util.Collection<XAttribute> getAttributesForExtension​(XExtension extension)
        For a given extension, returns prototypes of all registered attributes defined by that extension.
        Parameters:
        extension - Requested attribute extension.
        Returns:
        A collection of attribute prototypes registered for that extension.
      • getKeysForExtension

        java.util.Collection<java.lang.String> getKeysForExtension​(XExtension extension)
        For a given extension, returns the keys of all registered attributes defined by that extension.
        Parameters:
        extension - Requested attribute extension.
        Returns:
        A collection of attribute keys registered for that extension.
      • getAttributesWithoutExtension

        java.util.Collection<XAttribute> getAttributesWithoutExtension()
        Returns prototypes of all registered attributes defined by no extension.
        Returns:
        A collection of attribute prototypes registered for no extension.
      • getKeysWithoutExtension

        java.util.Collection<java.lang.String> getKeysWithoutExtension()
        Returns keys of all registered attributes defined by no extension.
        Returns:
        A collection of attribute keys registered for no extension.