gov.sandia.cognition.text.term
Class AbstractTerm

java.lang.Object
  extended by gov.sandia.cognition.util.AbstractCloneableSerializable
      extended by gov.sandia.cognition.text.term.AbstractTerm
All Implemented Interfaces:
Term, Termable, CloneableSerializable, Named, Serializable, Cloneable
Direct Known Subclasses:
DefaultTerm, DefaultTermNGram

public abstract class AbstractTerm
extends AbstractCloneableSerializable
implements Term

Creates a new AbstractTerm.

Since:
3.0
Author:
Justin Basilico
See Also:
Serialized Form

Constructor Summary
AbstractTerm()
          Creates a new AbstractTerm.
 
Method Summary
 Term asTerm()
          Get the term for the object.
 boolean equals(Object other)
           
 boolean equals(Term other)
          Determines if this term is equal to another term.
 int hashCode()
           
 String toString()
           
 
Methods inherited from class gov.sandia.cognition.util.AbstractCloneableSerializable
clone
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface gov.sandia.cognition.util.Named
getName
 
Methods inherited from interface gov.sandia.cognition.util.CloneableSerializable
clone
 

Constructor Detail

AbstractTerm

public AbstractTerm()
Creates a new AbstractTerm.

Method Detail

asTerm

public final Term asTerm()
Description copied from interface: Termable
Get the term for the object. This can be either a representation of the object as a term or a term that is part of the object.

Specified by:
asTerm in interface Termable
Returns:
The term representation of the object.

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object other)
Overrides:
equals in class Object

equals

public boolean equals(Term other)
Determines if this term is equal to another term. Two terms are equal if they have the same name.

Parameters:
other - The other term.
Returns:
True if the two terms are equal. Otherwise, false.

toString

public String toString()
Overrides:
toString in class Object