gov.nih.nlm.umls.meta
Class AbstractExpandedForm

java.lang.Object
  extended bygov.nih.nlm.umls.meta.AbstractExpandedForm
All Implemented Interfaces:
Comparable, ExpandedForm
Direct Known Subclasses:
AdditionalRelationshipLabel, AttributeName, CoocurrenceType, Language, RelationshipLabel, SemanticTypeGroup, SourceIdentifierType, StringType, Suppressible, TermStatus, TermType, TermTypeGroup

public abstract class AbstractExpandedForm
extends Object
implements ExpandedForm

Abstract implementation of ExpandedForm providing equals, hashCode, toString, and compareTo methods to any descendents. All classes implementing ExpandedForm should probably extend this class instead.

Author:
Brian Carlsen, Deborah Shapiro

Constructor Summary
AbstractExpandedForm()
           
 
Method Summary
 int compareTo(Object o)
          Compares the given Object with this ExpandedForm.
 boolean equals(Object o)
          Compares the given Object with this ExpandedForm for equality.
 int hashCode()
          Return a hash code based on key fields.
 String toString()
          Return a string representation for an Object consisting of its subkey.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface gov.nih.nlm.umls.meta.ExpandedForm
getAbbreviation, getDescription
 

Constructor Detail

AbstractExpandedForm

public AbstractExpandedForm()
Method Detail

equals

public boolean equals(Object o)
Compares the given Object with this ExpandedForm for equality.

Parameters:
o - parameter to be compared to this ExpandedForm
Returns:
true if they are equal false otherwise

compareTo

public int compareTo(Object o)
Compares the given Object with this ExpandedForm.

Specified by:
compareTo in interface Comparable
Parameters:
o - parameter to be compared to this ExpandedForm
Returns:
-1 if this object is less than the given Object parameter 0 if this object is equal to the given Object parameter 1 if this object is greater than the given Object parameter

hashCode

public int hashCode()
Return a hash code based on key fields.

Returns:
a hash code based on key fields

toString

public String toString()
Return a string representation for an Object consisting of its subkey.

Returns:
subkey


Copyright ©2005