Package jmri
Class Category
java.lang.Object
jmri.Category
- All Implemented Interfaces:
Comparable<Category>
- Direct Known Subclasses:
Category.Other,LogixNG_Category
A category of something.
Category was created for LogixNG actions and expressions but it can be used for everything in JMRI that needs "extendable enums".
This class is intended to be an Enum, but implemented as an abstract class to allow adding more categories later without needing to change this class. For example, external programs using JMRI as a lib might want to add their own categories.
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
OTHER
Other things.
-
-
Constructor Details
-
Category
-
-
Method Details
-
values
Get all the registered Categories- Returns:
- a list of categories
-
registerCategory
Register a category. There must not exist any category with either the name or the description of this category. Otherwise an IllegalArgumentException will be thrown.- Parameters:
category- the category- Returns:
- the new category
- Throws:
IllegalArgumentException- if the category already is registered.
-
name
-
toString
-
order
-
equals
-
hashCode
-
compareTo
- Specified by:
compareToin interfaceComparable<Category>
-