|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectedu.vub.at.objects.natives.NATNil
edu.vub.at.objects.natives.NATByCopy
edu.vub.at.objects.natives.grammar.NATAbstractGrammar
edu.vub.at.objects.natives.grammar.AGExpression
edu.vub.at.objects.natives.NATNumeric
A common superclass of both numbers and fractions to factor out common base-level behaviour.
| Field Summary |
| Fields inherited from class edu.vub.at.objects.natives.NATNil |
_INSTANCE_ |
| Constructor Summary | |
NATNumeric()
|
|
| Method Summary | |
NATNumeric |
asNativeNumeric()
|
ATBoolean |
base__opeql_(ATNumeric other)
a = b iff (a <=> b) == 0 |
ATBoolean |
base__opgtx__opeql_(ATNumeric other)
a >= b iff (a <=> b) ! |
ATBoolean |
base__opgtx_(ATNumeric other)
a > b iff (a <=> b) == +1 |
ATBoolean |
base__opltx__opeql_(ATNumeric other)
a <= b iff (a <=> b) ! |
ATBoolean |
base__opltx_(ATNumeric other)
a < b iff (a <=> b) == -1 |
ATBoolean |
base__opnot__opeql_(ATNumeric other)
a ! |
ATFraction |
base_cos()
NUM(n).cos() => FRC(Math.cos(n)) |
ATFraction |
base_expt(ATNumeric pow)
NUM(n).expt(NUM(e)) => FRC(Math.pow(n,e)) |
ATFraction |
base_log()
NUM(n).log() => FRC(log(e,n)) |
ATFraction |
base_sin()
NUM(n).sin() => FRC(Math.sin(n)) |
ATFraction |
base_sqrt()
NUM(n).sqrt() => FRC(Math.sqrt(n)) |
ATFraction |
base_tan()
NUM(n).tan() => FRC(Math.tan(n)) |
protected abstract double |
getJavaValue()
Template method that should return the value of the underlying number or fraction as a double |
ATTable |
meta_getStripes()
Returns the stripes of this object. |
| Methods inherited from class edu.vub.at.objects.natives.grammar.AGExpression |
base_asExpression |
| Methods inherited from class edu.vub.at.objects.natives.NATByCopy |
meta_pass, meta_resolve |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface edu.vub.at.objects.ATNumeric |
base__opdiv_, base__opltx__opeql__opgtx_, base__opmns_, base__oppls_, base__optms_, base_addFraction, base_addNumber, base_divideFraction, base_divideNumber, base_gequalsFraction, base_gequalsNumber, base_subtractFraction, base_subtractNumber, base_timesFraction, base_timesNumber |
| Methods inherited from interface edu.vub.at.objects.ATObject |
base__opeql__opeql_, base_init, base_new, meta_addField, meta_addMethod, meta_assignField, meta_assignVariable, meta_clone, meta_defineField, meta_doesNotUnderstand, meta_eval, meta_extend, meta_getDynamicParent, meta_getLexicalParent, meta_grabField, meta_grabMethod, meta_invoke, meta_isCloneOf, meta_isRelatedTo, meta_isStripedWith, meta_listFields, meta_listMethods, meta_lookup, meta_newInstance, meta_pass, meta_print, meta_quote, meta_receive, meta_resolve, meta_respondsTo, meta_select, meta_send, meta_share |
| Constructor Detail |
public NATNumeric()
| Method Detail |
protected abstract double getJavaValue()
public NATNumeric asNativeNumeric()
throws XTypeMismatch
asNativeNumeric in interface ATConversionsasNativeNumeric in class NATNilXTypeMismatch
public ATTable meta_getStripes()
throws InterpreterException
ATObject
meta_getStripes in interface ATObjectmeta_getStripes in class AGExpressionInterpreterExceptionpublic ATFraction base_cos()
base_cos in interface ATNumericpublic ATFraction base_sin()
base_sin in interface ATNumericpublic ATFraction base_tan()
base_tan in interface ATNumericpublic ATFraction base_log()
base_log in interface ATNumericpublic ATFraction base_sqrt()
base_sqrt in interface ATNumeric
public ATFraction base_expt(ATNumeric pow)
throws InterpreterException
base_expt in interface ATNumericInterpreterException
public ATBoolean base__opltx_(ATNumeric other)
throws InterpreterException
base__opltx_ in interface ATNumericInterpreterException
public ATBoolean base__opgtx_(ATNumeric other)
throws InterpreterException
base__opgtx_ in interface ATNumericInterpreterException
public ATBoolean base__opltx__opeql_(ATNumeric other)
throws InterpreterException
base__opltx__opeql_ in interface ATNumericInterpreterException
public ATBoolean base__opgtx__opeql_(ATNumeric other)
throws InterpreterException
base__opgtx__opeql_ in interface ATNumericInterpreterException
public ATBoolean base__opeql_(ATNumeric other)
throws InterpreterException
base__opeql_ in interface ATNumericInterpreterException
public ATBoolean base__opnot__opeql_(ATNumeric other)
throws InterpreterException
base__opnot__opeql_ in interface ATNumericInterpreterException
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||