de.zimek.proteinfeatures.protein
Class ID

java.lang.Object
  extended byde.zimek.proteinfeatures.protein.ID
All Implemented Interfaces:
java.lang.Comparable
Direct Known Subclasses:
CathID, ScopID

public abstract class ID
extends java.lang.Object
implements java.lang.Comparable

ID to represent a hierarchical classification.

Author:
Arthur Zimek

Constructor Summary
ID()
           
 
Method Summary
abstract  ID createID(java.lang.String id)
          Returns a new ID for the given id-String.
abstract  boolean equals(java.lang.Object o)
          Returns true, if the ID equals another ID at all levels, false otherwise.
abstract  java.lang.String getID(int level)
          Returns the ID for the first level levels.
abstract  int getLevel(int level)
          Returns the id-value in the specified level.
 int hashCode()
          Returns a hashCode, which is the hashCode for the String returned by the toString()-method.
abstract  java.lang.String toString()
          Provides a String-representation for the ID.
abstract  java.lang.String type()
          Returns a String describing the type of the ID.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.lang.Comparable
compareTo
 

Constructor Detail

ID

public ID()
Method Detail

getID

public abstract java.lang.String getID(int level)
Returns the ID for the first level levels.

Parameters:
level -
Returns:
String

getLevel

public abstract int getLevel(int level)
Returns the id-value in the specified level.

Parameters:
level -
Returns:
int

toString

public abstract java.lang.String toString()
Provides a String-representation for the ID.

See Also:
Object.toString()

equals

public abstract boolean equals(java.lang.Object o)
Returns true, if the ID equals another ID at all levels, false otherwise.

See Also:
Object.equals(Object)

createID

public abstract ID createID(java.lang.String id)
Returns a new ID for the given id-String.

Parameters:
id -
Returns:
ID

hashCode

public int hashCode()
Returns a hashCode, which is the hashCode for the String returned by the toString()-method.

See Also:
Object.hashCode()

type

public abstract java.lang.String type()
Returns a String describing the type of the ID.

Returns:
String