Class Category

  • All Implemented Interfaces:
    Serializable

    public class Category
    extends Object
    implements Serializable
    This Category information. Basically a name and an optional Subcategory. Categories are defined by Apple. See ITMS for a view.
    See Also:
    Serialized Form
    • Constructor Detail

      • Category

        public Category()
      • Category

        public Category​(String name)
        Creates a new instance of Category with a given name.
        Parameters:
        name - Name of the category.
    • Method Detail

      • getName

        public String getName()
        Returns the name of the category
        Returns:
        Returns the name of the category
      • setName

        public void setName​(String name)
        Sets the name of the category
        Parameters:
        name - Sets the name of the category
      • getSubcategory

        public Subcategory getSubcategory()
        Returns the Subcategory object for this category
        Returns:
        Returns the Subcategory object for this category
      • getSubcategories

        public List<Subcategory> getSubcategories()
        Returns the list of subcategories under this category
        Returns:
        List of subcategories
      • setSubcategory

        public void setSubcategory​(Subcategory subcategory)
        Sets the Subcategory object for this category
        Parameters:
        subcategory - Sets the Subcategory object for this category
      • setSubcategories

        public void setSubcategories​(List<Subcategory> subcategories)
      • addSubcategory

        public void addSubcategory​(Subcategory subcategory)
      • clone

        public Object clone()
        Returns a copy of this category.
        Overrides:
        clone in class Object
        Returns:
        Returns a copy of this category.