org.deri.wsmo4j.logicalexpression.terms
Class NumberedAnonymousIDImpl

java.lang.Object
  extended by org.deri.wsmo4j.logicalexpression.terms.NumberedAnonymousIDImpl
All Implemented Interfaces:
Serializable, org.omwg.logicalexpression.terms.NumberedAnonymousID, org.omwg.logicalexpression.terms.Term

public class NumberedAnonymousIDImpl
extends Object
implements Serializable, org.omwg.logicalexpression.terms.NumberedAnonymousID

An interface representing an anonymous numbered identifier

Since:
0.4.0
Version:
$Revision: 1030 $ $Date: 2005-09-21 11:15:39 +0300 (Wed, 21 Sep 2005) $
Author:
not attributable
See Also:
Serialized Form

Constructor Summary
NumberedAnonymousIDImpl(byte id)
           
 
Method Summary
 void accept(org.omwg.logicalexpression.terms.Visitor v)
           
 boolean equals(Object o)
           The equals method implements an equivalence relation on non-null object references.
 byte getNumber()
           
 int hashCode()
           If two objects are equal according to the equals(Object) method, then calling the hashCode method on each of the two objects must produce the same integer result.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

NumberedAnonymousIDImpl

public NumberedAnonymousIDImpl(byte id)
Method Detail

toString

public String toString()
Overrides:
toString in class Object

getNumber

public byte getNumber()
Specified by:
getNumber in interface org.omwg.logicalexpression.terms.NumberedAnonymousID

accept

public void accept(org.omwg.logicalexpression.terms.Visitor v)
Specified by:
accept in interface org.omwg.logicalexpression.terms.Term

equals

public boolean equals(Object o)

The equals method implements an equivalence relation on non-null object references. Numbered Anonymous IDs are equal when they have the same number within the same scope, this method only checks the former.

It is generally necessary to override the hashCode method whenever this method is overridden.

Overrides:
equals in class Object
Parameters:
o - Object of Type Numbered Anonymous ID
Returns:
true if this Numbered Anonymous ID's number is the same as the obj argument's number; false otherwise.
See Also:
Object.equals(java.lang.Object), Object.hashCode()

hashCode

public int hashCode()

If two objects are equal according to the equals(Object) method, then calling the hashCode method on each of the two objects must produce the same integer result. However, it is not required that if two objects are unequal according to the equals(Object) method, then calling the hashCode method on each of the two objects must produce distinct integer results.

This method should be overriden, when the equals(Object) method is overriden.

Overrides:
hashCode in class Object
Returns:
number of the Numbered Anonymous ID
See Also:
Object.hashCode(), Object.equals(Object), com.ontotext.wsmo4j.common.NumberedIDImpl#getNumber()


Copyright © 2004-2008 Ontotext Lab.. All Rights Reserved.