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 Stringm_Datathe data of the favorite.protected Stringm_Namethe 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 intcompareTo(Object o)Compares this object with the specified object for order.booleanequals(Object obj)Indicates whether some other object is "equal to" this one.StringFavorites.StringFavoritegetClone()Returns a copy of itself.StringgetData()Returns the data of the favorite.StringgetName()Returns the name of the favorite.inthashCode()Hashcode so can be used as hashtable key.StringtoString()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:
getClonein 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:
compareToin 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.
-
-