public class Category
extends java.lang.Object
implements java.io.Serializable
Modifier and Type | Field and Description |
---|---|
private java.lang.String |
name |
private static long |
serialVersionUID |
private Subcategory |
subcategory |
Constructor and Description |
---|
Category() |
Category(java.lang.String name)
Creates a new instance of Category with a given name.
|
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
clone()
Returns a copy of this category.
|
java.lang.String |
getName()
Returns the name of the category
|
Subcategory |
getSubcategory()
Returns the Subcategory object for this category
|
void |
setName(java.lang.String name)
Sets the name of the category
|
void |
setSubcategory(Subcategory subcategory)
Sets the Subcategory object for this category
|
java.lang.String |
toString() |
private static final long serialVersionUID
private java.lang.String name
private Subcategory subcategory
public Category()
public Category(java.lang.String name)
name
- Name of the category.public java.lang.String getName()
public void setName(java.lang.String name)
name
- Sets the name of the categorypublic Subcategory getSubcategory()
public void setSubcategory(Subcategory subcategory)
subcategory
- Sets the Subcategory object for this categorypublic java.lang.Object clone()
clone
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object