Interface CategoryAttribute

  • All Superinterfaces:
    Attribute
    All Known Implementing Classes:
    CategoryAttributeImpl

    public interface CategoryAttribute
    extends Attribute
    An attribute which contains for a certain category the CategoryPath and additional properties.
    WARNING: This API is experimental and might change in incompatible ways in the next release.
    • Method Detail

      • setCategoryPath

        void setCategoryPath​(CategoryPath cp)
        Sets the category path value of this attribute.
        Parameters:
        cp - A category path. May not be null.
      • getCategoryPath

        CategoryPath getCategoryPath()
        Returns the value of this attribute: a category path.
        Returns:
        The category path last assigned to this attribute, or null if none has been assigned.
      • getProperty

        CategoryProperty getProperty​(Class<? extends CategoryProperty> propertyClass)
        Get a property of a certain property class.
        Parameters:
        propertyClass - The required property class.
        Returns:
        The property of the given class, or null if no such property exists.
      • getProperty

        CategoryProperty getProperty​(Collection<Class<? extends CategoryProperty>> propertyClasses)
        Get a property of one of given property classes.
        Parameters:
        propertyClasses - The property classes.
        Returns:
        A property matching one of the given classes, or null if no such property exists.
      • getPropertyClasses

        Set<Class<? extends CategoryProperty>> getPropertyClasses()
        Get all the active property classes.
        Returns:
        A set containing the active property classes, or null if there are no properties.
      • clear

        void clear()
        Resets this attribute to its initial value: a null category path and no properties.
      • clearProperties

        void clearProperties()
        Clear all properties.
      • remove

        void remove​(Class<? extends CategoryProperty> propertyClass)
        Remove an property of a certain property class.
        Parameters:
        propertyClass - The required property class.