Package jmri.jmrit.logixng
Class Category
- java.lang.Object
-
- jmri.jmrit.logixng.Category
-
- All Implemented Interfaces:
java.lang.Comparable<Category>
- Direct Known Subclasses:
Category.Common
,Category.FlowControl
,Category.Item
,Category.Linux
,Category.Other
,CategoryDisplay
,CategoryLocoNet
,CategoryMqtt
,ExpressionFactory.LocoNet
public abstract class Category extends java.lang.Object implements java.lang.Comparable<Category>
The category of expressions and actions.It's used to group expressions or actions then the user creates a new expression or action.
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 Modifier and Type Class Description static class
Category.Common
static class
Category.FlowControl
static class
Category.Item
static class
Category.Linux
static class
Category.Other
-
Field Summary
Fields Modifier and Type Field Description static Category.Common
COMMON
Common.static Category.FlowControl
FLOW_CONTROL
Flow Control.static Category.Item
ITEM
A item on the layout, for example turnout, sensor and signal mast.static Category.Linux
LINUX
Linux specific things.static Category.Other
OTHER
Other things.
-
Constructor Summary
Constructors Modifier Constructor Description protected
Category(java.lang.String name, java.lang.String description, int order)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description int
compareTo(Category c)
boolean
equals(java.lang.Object o)
int
hashCode()
java.lang.String
name()
int
order()
static void
registerCategory(Category category)
Register a categoryjava.lang.String
toString()
static java.util.List<Category>
values()
Get all the registered Categories
-
-
-
Field Detail
-
ITEM
public static final Category.Item ITEM
A item on the layout, for example turnout, sensor and signal mast.
-
COMMON
public static final Category.Common COMMON
Common.
-
FLOW_CONTROL
public static final Category.FlowControl FLOW_CONTROL
Flow Control.
-
OTHER
public static final Category.Other OTHER
Other things.
-
LINUX
public static final Category.Linux LINUX
Linux specific things.
-
-
Constructor Detail
-
Category
protected Category(java.lang.String name, java.lang.String description, int order)
-
-
Method Detail
-
values
public static java.util.List<Category> values()
Get all the registered Categories- Returns:
- a list of categories
-
registerCategory
public static void registerCategory(Category category)
Register a category- Parameters:
category
- the category
-
name
public java.lang.String name()
-
toString
public final java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
order
public int order()
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
-