net.sf.tomp.general
Class IdentifiableBase

java.lang.Object
  extended by net.sf.tomp.general.IdentifiableBase
All Implemented Interfaces:
Identifiable

public class IdentifiableBase
extends java.lang.Object
implements Identifiable

Base class for identifiable objects, overrides equals(), hashCode() in order to test equality

Author:
tomp

Constructor Summary
IdentifiableBase(java.lang.String i)
          Creates a new instance of IdentifiableBase
 
Method Summary
 boolean equals(java.lang.Object o)
          Compares objects on the IDs.
 java.lang.String getId()
           
 int hashCode()
           
 void setId(java.lang.String s)
          sets the ID to the object
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IdentifiableBase

public IdentifiableBase(java.lang.String i)
Creates a new instance of IdentifiableBase

Method Detail

getId

public java.lang.String getId()
Specified by:
getId in interface Identifiable
Returns:
the ID of the object

setId

public void setId(java.lang.String s)
sets the ID to the object


hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

equals

public boolean equals(java.lang.Object o)
Compares objects on the IDs.

Overrides:
equals in class java.lang.Object


Copyright © 2004-2005 Masaryk University in Brno, Faculty of Informatics, Czech Republic. All Rights Reserved.