public class Tag extends Object implements Serializable, RevisionHandler
Tag
simply associates a numeric ID with a String description.Constructor and Description |
---|
Tag()
Creates a new default Tag
|
Tag(int ident,
String readable)
Creates a new
Tag instance. |
Tag(int ident,
String identStr,
String readable)
Creates a new
Tag instance. |
Tag(int ident,
String identStr,
String readable,
boolean upperCase) |
Modifier and Type | Method and Description |
---|---|
int |
getID()
Gets the numeric ID of the Tag.
|
String |
getIDStr()
Gets the string ID of the Tag.
|
String |
getReadable()
Gets the string description of the Tag.
|
String |
getRevision()
Returns the revision string.
|
void |
setID(int id)
Sets the numeric ID of the Tag.
|
void |
setIDStr(String str)
Sets the string ID of the Tag.
|
void |
setReadable(String r)
Sets the string description of the Tag.
|
static 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 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
|
String |
toString()
returns the IDStr
|
public Tag()
public Tag(int ident, String readable)
Tag
instance.ident
- the ID for the new Tag.readable
- the description for the new Tag.public Tag(int ident, String identStr, 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 void setID(int id)
id
- the ID of the Tag.public String getIDStr()
public void setIDStr(String str)
str
- the string ID of the Tag.public String getReadable()
public void setReadable(String r)
r
- the description of the Tag.public String toString()
public static String toOptionList(Tag[] tags)
tags
- the tags to create the list forpublic static String toOptionSynopsis(Tag[] tags)
tags
- the tags to create the string forpublic String getRevision()
getRevision
in interface RevisionHandler
Copyright © 2019 University of Waikato, Hamilton, NZ. All rights reserved.