Permalink
Cannot retrieve contributors at this time
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
HowToKB/src/kb/howtokb/wkhobject/Category.java
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
70 lines (67 sloc)
1.54 KB
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package kb.howtokb.wkhobject; | |
public class Category { | |
private String category; | |
private String parent; | |
private String child; | |
public Category(){ | |
this.category = ""; | |
this.parent = ""; | |
this.child = ""; | |
} | |
public Category(String cate, String parent, String child){ | |
this.category = cate; | |
this.parent = parent; | |
this.child = child; | |
} | |
// ====================================================================== | |
/** | |
* Get category | |
* @return category | |
*/ | |
public String getCategory(){ | |
return category; | |
} | |
// ====================================================================== | |
/** | |
* Set category | |
* @param category | |
*/ | |
public void setCategory(String cate){ | |
this.category = cate; | |
} | |
// ====================================================================== | |
/** | |
* Get parent of current category | |
* @return category | |
*/ | |
public String getParent(){ | |
return this.parent; | |
} | |
// ====================================================================== | |
/** | |
* Set parent of current category | |
* @param parent of category | |
*/ | |
public void setParent(String parent){ | |
this.parent = parent; | |
} | |
// ====================================================================== | |
/** | |
* Get child of current category | |
* @return category | |
*/ | |
public String getChild(){ | |
return this.child; | |
} | |
// ====================================================================== | |
/** | |
* Set child of current category | |
* @param child of category | |
*/ | |
public void setChild(String child){ | |
this.child = child; | |
} | |
public String toString(){ | |
return getCategory(); | |
} | |
} |