org.dllearner.prolog
Class Number

java.lang.Object
  extended by org.dllearner.prolog.Term
      extended by org.dllearner.prolog.Constant
          extended by org.dllearner.prolog.Number
All Implemented Interfaces:
Cloneable

public class Number
extends Constant

Author:
Sebastian Bader

Constructor Summary
Number(double value)
           
Number(String src)
           
 
Method Summary
 Object clone()
           
 boolean equals(Object obj)
           
 double getDoubleValue()
           
 Term getInstance(Variable variable, Term term)
           
 int getIntValue()
           
 int hashCode()
           
 boolean isGround()
           
 String toPLString()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Number

public Number(String src)

Number

public Number(double value)
Method Detail

getIntValue

public int getIntValue()

getDoubleValue

public double getDoubleValue()

isGround

public boolean isGround()
Specified by:
isGround in class Term
Returns:
Returns true iff this term is ground

toString

public String toString()
Specified by:
toString in class Term

toPLString

public String toPLString()
Specified by:
toPLString in class Term

getInstance

public Term getInstance(Variable variable,
                        Term term)
Specified by:
getInstance in class Term
Parameters:
variable - Substitution variable.
term - A term.
Returns:
Returns a new instance of this term, where the variable is replaced by the term.

hashCode

public int hashCode()
Specified by:
hashCode in class Term

equals

public boolean equals(Object obj)
Specified by:
equals in class Term

clone

public Object clone()
Specified by:
clone in class Term


SourceForge.net Logo DL-Learner is licenced under the terms of the GNU General Public License.
Copyright © 2007-2011 Jens Lehmann