All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class fr.inria.openmath.omapi.Symbol

java.lang.Object
   |
   +----fr.inria.openmath.omapi.Symbol

public class Symbol
extends Object
A symbol belongs to one (and only one) content dictionary and has a name. A symbol is thus completely identified by its name and the name of the content dictionary it belongs to.


Constructor Index

 o Symbol()
 o Symbol(String)
 o Symbol(String, String)

Method Index

 o equals(Object)
Compares this Symbol to the specified object.
 o equals(String, String)
Compares this Symbol to another (without having to build its instance).
 o getCD()
Returns the CD of the symbol.
 o getName()
Returns the name of the symbol.
 o hashCode()
Computes a hashcode for this symbol.
 o toString()

Constructors

 o Symbol
 public Symbol()
 o Symbol
 public Symbol(String name)
 o Symbol
 public Symbol(String cd,
               String name)

Methods

 o toString
 public String toString()
Overrides:
toString in class Object
 o getCD
 public String getCD()
Returns the CD of the symbol.

Returns:
the CD of the symbol.
 o getName
 public String getName()
Returns the name of the symbol.

Returns:
the name of the symbol.
 o equals
 public boolean equals(Object anObject)
Compares this Symbol to the specified object.

The result is true if and only if the argument is not null and is a Symbol object that represents the same symbol (same name and same CD) as this object.

Parameters:
s - anObject - the object to compare this Symbol against.
Returns:
true if symbols are equals, false otherwise.
Overrides:
equals in class Object
 o equals
 public boolean equals(String cdName,
                       String symbName)
Compares this Symbol to another (without having to build its instance).

The result is true if and only if the arguments are not null and if the cdName and symbName are equals to those of this object.

Parameters:
s - cdName - the cd name to compare this Symbol against.
s - symbName - the symbol name to compare this Symbol against.
Returns:
true if symbols are equals, false otherwise.
 o hashCode
 public int hashCode()
Computes a hashcode for this symbol.

Returns:
A hash code.
Overrides:
hashCode in class Object

All Packages  Class Hierarchy  This Package  Previous  Next  Index