Class Category

  • All Implemented Interfaces:
    com.globalmentor.model.IDed<java.lang.String>, com.globalmentor.model.Named<java.lang.String>, java.lang.Comparable<com.globalmentor.model.Named<java.lang.String>>

    public class Category
    extends com.globalmentor.model.DefaultComparableIDNamed<java.lang.String,​java.lang.String>
    A general category used in Guise.
    Author:
    Garret Wilson
    • Constructor Summary

      Constructors 
      Constructor Description
      Category​(java.lang.String id)
      Constructor for a category with the same ID and name.
      Category​(java.lang.String id, java.lang.String name)
      Constructor specifying the ID and name.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.Iterable<Category> getCategories()  
      void setCategories​(java.util.List<Category> categories)
      Sets the categories.
      • Methods inherited from class com.globalmentor.model.DefaultComparableIDNamed

        equals, getID, hashCode, toString
      • Methods inherited from class com.globalmentor.model.DefaultComparableNamed

        compareTo
      • Methods inherited from class com.globalmentor.model.DefaultNamed

        getName
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
      • Methods inherited from interface java.lang.Comparable

        compareTo
    • Constructor Detail

      • Category

        public Category​(java.lang.String id)
        Constructor for a category with the same ID and name.
        Parameters:
        id - The ID of the category, which will also be used as the category's name.
      • Category

        public Category​(java.lang.String id,
                        java.lang.String name)
        Constructor specifying the ID and name.
        Parameters:
        id - The ID of the category.
        name - The name of the category.
    • Method Detail

      • getCategories

        public java.lang.Iterable<Category> getCategories()
        Returns:
        The read-only iterable of categories.
      • setCategories

        public void setCategories​(java.util.List<Category> categories)
        Sets the categories.
        Parameters:
        categories - The list of new categories.