public class Tag
extends java.lang.Object
Tag
simply associates a numeric ID with a String description.Modifier and Type | Field and Description |
---|---|
protected int |
m_ID
The ID
|
protected java.lang.String |
m_IDStr
The unique string for this tag, doesn't have to be numeric
|
protected java.lang.String |
m_Readable
The descriptive text
|
Constructor and Description |
---|
Tag(int ident,
java.lang.String readable)
Creates a new
Tag instance. |
Tag(int ident,
java.lang.String identStr,
java.lang.String readable)
Creates a new
Tag instance. |
Modifier and Type | Method and Description |
---|---|
int |
getID()
Gets the numeric ID of the Tag.
|
java.lang.String |
getIDStr()
Gets the string ID of the Tag.
|
java.lang.String |
getReadable()
Gets the string description of the Tag.
|
static java.lang.String |
toOptionList(Tag[] tags)
returns a list that can be used in the listOption methods to list all
the available ID strings, e.g.: <0|1|2> or <what|ever>
|
static java.lang.String |
toOptionSynopsis(Tag[] tags)
returns a string that can be used in the listOption methods to list all
the available options, i.e., "\t\tID = Text\n" for each option
|
java.lang.String |
toString()
returns the IDStr
|
protected int m_ID
protected java.lang.String m_IDStr
protected java.lang.String m_Readable
public Tag(int ident, java.lang.String readable)
Tag
instance.ident
- the ID for the new Tag.readable
- the description for the new Tag.public Tag(int ident, java.lang.String identStr, java.lang.String readable)
Tag
instance.ident
- the ID for the new Tag.identStr
- the ID string for the new Tag (case-insensitive).readable
- the description for the new Tag.public int getID()
public java.lang.String getIDStr()
public java.lang.String getReadable()
public java.lang.String toString()
toString
in class java.lang.Object
public static java.lang.String toOptionList(Tag[] tags)
tags
- the tags to create the list forpublic static java.lang.String toOptionSynopsis(Tag[] tags)
tags
- the tags to create the string for