cgp.runtime
Class NumberType

java.lang.Object
  |
  +--cgp.runtime.Type
        |
        +--cgp.runtime.NumberType

public class NumberType
extends Type


Field Summary
private  double value
           
 
Fields inherited from class cgp.runtime.Type
kbStack, scopeStack, type
 
Constructor Summary
NumberType(double n)
           
 
Method Summary
 Type addOp(Type other)
          Arithmetic addition.
 NumberType ceil()
           
 StringType chr()
          Return a string which this number represents as ASCII.
 NumberType cos()
           
 NumberType dec()
           
 Type divideOp(Type other)
           
 Type eqOp(Type other)
           
 boolean equals(java.lang.Object other)
           
 NumberType floor()
           
 Type geOp(Type other)
           
 double getValue()
           
 Type gtOp(Type other)
           
 NumberType inc()
           
 Type leOp(Type other)
           
 Type ltOp(Type other)
           
 Type modulusOp(Type other)
           
 Type multiplyOp(Type other)
           
 Type negateOp()
           
 Type neOp(Type other)
           
 NumberType pow(NumberType exponent)
          pCG member functions.
 NumberType round()
           
 NumberType sin()
           
 NumberType sqrt()
           
 Type subtractOp(Type other)
           
 NumberType tan()
           
 java.lang.String toString()
           
 
Methods inherited from class cgp.runtime.Type
andOp, getAttr, getKBStack, getNthOp, getScopeStack, getType, invokeMemberFunc, isOp, notOp, operationError, orOp, setAttr, setKBStack, setNthOp, setScopeStack, setType
 
Methods inherited from class java.lang.Object
, clone, finalize, getClass, hashCode, notify, notifyAll, registerNatives, wait, wait, wait
 

Field Detail

value

private double value
Constructor Detail

NumberType

public NumberType(double n)
Method Detail

getValue

public double getValue()

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

equals

public boolean equals(java.lang.Object other)
Overrides:
equals in class java.lang.Object

gtOp

public Type gtOp(Type other)
Overrides:
gtOp in class Type

ltOp

public Type ltOp(Type other)
Overrides:
ltOp in class Type

geOp

public Type geOp(Type other)
Overrides:
geOp in class Type

leOp

public Type leOp(Type other)
Overrides:
leOp in class Type

eqOp

public Type eqOp(Type other)
Overrides:
eqOp in class Type

neOp

public Type neOp(Type other)
Overrides:
neOp in class Type

addOp

public Type addOp(Type other)
Arithmetic addition.
Overrides:
addOp in class Type

subtractOp

public Type subtractOp(Type other)
Overrides:
subtractOp in class Type

multiplyOp

public Type multiplyOp(Type other)
Overrides:
multiplyOp in class Type

divideOp

public Type divideOp(Type other)
Overrides:
divideOp in class Type

modulusOp

public Type modulusOp(Type other)
Overrides:
modulusOp in class Type

negateOp

public Type negateOp()
Overrides:
negateOp in class Type

pow

public NumberType pow(NumberType exponent)
pCG member functions. "// **" indicates that this value is mutated.

sqrt

public NumberType sqrt()

sin

public NumberType sin()

cos

public NumberType cos()

tan

public NumberType tan()

floor

public NumberType floor()

ceil

public NumberType ceil()

round

public NumberType round()

inc

public NumberType inc()

dec

public NumberType dec()

chr

public StringType chr()
Return a string which this number represents as ASCII.