edu.rice.cs.util.sexp
Class NumberAtom

java.lang.Object
  extended by edu.rice.cs.util.sexp.NumberAtom
All Implemented Interfaces:
Atom, SExp

public class NumberAtom
extends Object
implements Atom


Constructor Summary
NumberAtom(double num)
           
NumberAtom(int num)
           
 
Method Summary
<Ret> Ret
accept(SExpVisitor<Ret> v)
          Visitor hook for the NumberAtom
 double doubleValue()
           
 boolean hasDecimals()
           
 int intValue()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

NumberAtom

public NumberAtom(int num)

NumberAtom

public NumberAtom(double num)
Method Detail

hasDecimals

public boolean hasDecimals()

intValue

public int intValue()

doubleValue

public double doubleValue()

accept

public <Ret> Ret accept(SExpVisitor<Ret> v)
Visitor hook for the NumberAtom

Specified by:
accept in interface Atom
Specified by:
accept in interface SExp
Parameters:
v - the visitor
Returns:
result of the given algorithm

toString

public String toString()
Overrides:
toString in class Object