edu.rice.cs.util.sexp
Class NumberAtom
java.lang.Object
edu.rice.cs.util.sexp.NumberAtom
- All Implemented Interfaces:
- Atom, SExp
public class NumberAtom
- extends Object
- implements Atom
NumberAtom
public NumberAtom(int num)
NumberAtom
public NumberAtom(double num)
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