Package adams.gui.core
Class StringFavorites.StringFavorite
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.gui.core.StringFavorites.StringFavorite
-
- All Implemented Interfaces:
CloneHandler<StringFavorites.StringFavorite>
,LoggingSupporter
,SizeOfHandler
,Serializable
,Comparable
- Enclosing class:
- StringFavorites
public static class StringFavorites.StringFavorite extends LoggingObject implements Comparable, CloneHandler<StringFavorites.StringFavorite>
Container class for a favorite setup.- Author:
- fracpete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected String
m_Data
the data of the favorite.protected String
m_Name
the name of the favorite.-
Fields inherited from class adams.core.logging.LoggingObject
m_Logger, m_LoggingIsEnabled, m_LoggingLevel
-
-
Constructor Summary
Constructors Constructor Description StringFavorite(String name, String data)
Initializes the favorite.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
compareTo(Object o)
Compares this object with the specified object for order.boolean
equals(Object obj)
Indicates whether some other object is "equal to" this one.StringFavorites.StringFavorite
getClone()
Returns a copy of itself.String
getData()
Returns the data of the favorite.String
getName()
Returns the name of the favorite.int
hashCode()
Hashcode so can be used as hashtable key.String
toString()
Returns the name of the favorite.-
Methods inherited from class adams.core.logging.LoggingObject
configureLogger, getLogger, getLoggingLevel, initializeLogging, isLoggingEnabled, sizeOf
-
-
-
-
Method Detail
-
getName
public String getName()
Returns the name of the favorite.- Returns:
- the name
-
getData
public String getData()
Returns the data of the favorite.- Returns:
- the data
-
getClone
public StringFavorites.StringFavorite getClone()
Returns a copy of itself.- Specified by:
getClone
in interfaceCloneHandler<StringFavorites.StringFavorite>
- Returns:
- the copy
-
compareTo
public int compareTo(Object o)
Compares this object with the specified object for order. Returns a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object.- Specified by:
compareTo
in interfaceComparable
- Parameters:
o
- the object to be compared.- Returns:
- a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object.
- Throws:
ClassCastException
- if the specified object's type prevents it from being compared to this object.
-
equals
public boolean equals(Object obj)
Indicates whether some other object is "equal to" this one.
-
hashCode
public int hashCode()
Hashcode so can be used as hashtable key. Returns the hashcode of the name string.
-
-