Package adams.core.tags
Class TagInfo
- java.lang.Object
-
- adams.core.tags.TagInfo
-
- All Implemented Interfaces:
Serializable
,Comparable<TagInfo>
public class TagInfo extends Object implements Serializable, Comparable<TagInfo>
Stores information about a tag.- Author:
- FracPete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected Class[]
m_AppliesTo
the classes this tag applies to.protected TagDataType
m_DataType
the data type.protected String
m_Information
the information.protected String
m_Name
the name.
-
Constructor Summary
Constructors Constructor Description TagInfo(String name, String info, TagDataType dataType, Class[] appliesTo)
Initializes the tag.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
compareTo(TagInfo o)
Simply compares the names of the tags.boolean
equals(Object obj)
Checks whether to the objects are identical.Class[]
getAppliesTo()
Returns the classes that this tag applies to.TagDataType
getDataType()
Returns the data type of the tag.String
getInformation()
Returns the help for the tag.String
getName()
Returns the name of the tag.int
hashCode()
Returns the hashcode of the tag (ie name).String
toString()
Returns a short description of the tag.
-
-
-
Field Detail
-
m_Name
protected String m_Name
the name.
-
m_Information
protected String m_Information
the information.
-
m_DataType
protected TagDataType m_DataType
the data type.
-
m_AppliesTo
protected Class[] m_AppliesTo
the classes this tag applies to.
-
-
Constructor Detail
-
TagInfo
public TagInfo(String name, String info, TagDataType dataType, Class[] appliesTo)
Initializes the tag.- Parameters:
name
- the name, ie., the string to use when tagging an objectinfo
- the help textdataType
- the data typeappliesTo
- the classes this tag applies to
-
-
Method Detail
-
getName
public String getName()
Returns the name of the tag.- Returns:
- the name
-
getInformation
public String getInformation()
Returns the help for the tag.- Returns:
- the help text
-
getDataType
public TagDataType getDataType()
Returns the data type of the tag.- Returns:
- the data type
-
getAppliesTo
public Class[] getAppliesTo()
Returns the classes that this tag applies to.- Returns:
- the classes
-
compareTo
public int compareTo(TagInfo o)
Simply compares the names of the tags.- Specified by:
compareTo
in interfaceComparable<TagInfo>
- Parameters:
o
- the other tag to compare with- Returns:
- less than 0, equal to 0 or greater than 0 if this name is less than, equal to or greater than the other one
-
equals
public boolean equals(Object obj)
Checks whether to the objects are identical.
-
hashCode
public int hashCode()
Returns the hashcode of the tag (ie name).
-
-