Package weka.core
Class Tag
java.lang.Object
weka.core.Tag
- All Implemented Interfaces:
Serializable,RevisionHandler
A
Tag simply associates a numeric ID with a String description.- Version:
- $Revision: 8034 $
- Author:
- Len Trigg
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintgetID()Gets the numeric ID of the Tag.getIDStr()Gets the string ID of the Tag.Gets the string description of the Tag.Returns the revision string.voidsetID(int id) Sets the numeric ID of the Tag.voidSets the string ID of the Tag.voidSets the string description of the Tag.static StringtoOptionList(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 StringtoOptionSynopsis(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 optiontoString()returns the IDStr
-
Constructor Details
-
Tag
public Tag()Creates a new default Tag -
Tag
Creates a newTaginstance.- Parameters:
ident- the ID for the new Tag.readable- the description for the new Tag.
-
Tag
Creates a newTaginstance.- Parameters:
ident- the ID for the new Tag.identStr- the ID string for the new Tag (case-insensitive).readable- the description for the new Tag.
-
Tag
-
-
Method Details
-
getID
public int getID()Gets the numeric ID of the Tag.- Returns:
- the ID of the Tag.
-
setID
public void setID(int id) Sets the numeric ID of the Tag.- Parameters:
id- the ID of the Tag.
-
getIDStr
Gets the string ID of the Tag.- Returns:
- the string ID of the Tag.
-
setIDStr
Sets the string ID of the Tag.- Parameters:
str- the string ID of the Tag.
-
getReadable
Gets the string description of the Tag.- Returns:
- the description of the Tag.
-
setReadable
Sets the string description of the Tag.- Parameters:
r- the description of the Tag.
-
toString
returns the IDStr -
toOptionList
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>- Parameters:
tags- the tags to create the list for- Returns:
- a list of all ID strings
-
toOptionSynopsis
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- Parameters:
tags- the tags to create the string for- Returns:
- a string explaining the tags
-
getRevision
Returns the revision string.- Specified by:
getRevisionin interfaceRevisionHandler- Returns:
- the revision
-