|
|||||||||||
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
edu.vub.at.objects.natives.NATFraction
The native implementation of an AmbientTalk fraction. A fraction is implemented by a Java double.
Field Summary | |
static NATFraction |
INFTY
|
double |
javaValue
|
Fields inherited from class edu.vub.at.objects.natives.NATNil |
_INSTANCE_ |
Constructor Summary | |
private |
NATFraction(double javaFrc)
|
Method Summary | |
NATFraction |
asNativeFraction()
|
static NATFraction |
atValue(double javaFrc)
This method currently serves as a hook for fraction creation. |
ATNumeric |
base__opdiv_(ATNumeric other)
|
ATNumeric |
base__opltx__opeql__opgtx_(ATNumeric other)
|
ATNumeric |
base__opmns_(ATNumeric other)
|
ATNumeric |
base__oppls_(ATNumeric other)
|
ATNumeric |
base__optms_(ATNumeric other)
|
ATNumeric |
base_abs()
FRC(n).abs() => FRC(abs(n)) |
ATNumeric |
base_addFraction(ATFraction other)
|
ATNumeric |
base_addNumber(ATNumber other)
|
ATNumber |
base_ceiling()
FRC(n).ceiling() => NBR(ceil(n)) |
ATNumeric |
base_dec()
FRC(n).dec() => FRC(n-1) |
ATNumeric |
base_divideFraction(ATFraction other)
|
ATNumeric |
base_divideNumber(ATNumber other)
|
ATNumber |
base_floor()
FRC(n).floor() => NBR(floor(n)) |
ATNumeric |
base_gequalsFraction(ATFraction other)
|
ATNumeric |
base_gequalsNumber(ATNumber other)
|
ATNumeric |
base_inc()
FRC(n).inc() => FRC(n+1) |
ATNumber |
base_round()
FRC(n).round() => NBR(round(n)) |
ATNumeric |
base_subtractFraction(ATFraction other)
|
ATNumeric |
base_subtractNumber(ATNumber other)
|
ATNumeric |
base_timesFraction(ATFraction other)
|
ATNumeric |
base_timesNumber(ATNumber other)
|
boolean |
equals(java.lang.Object other)
By default, two AmbientTalk objects are equal if they are the same object, or one is a proxy for the same object. |
protected 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. |
NATText |
meta_print()
Prints out the object in a human-readable way. |
Methods inherited from class edu.vub.at.objects.natives.NATNumeric |
asNativeNumeric, base__opeql_, base__opgtx__opeql_, base__opgtx_, base__opltx__opeql_, base__opltx_, base__opnot__opeql_, base_cos, base_expt, base_log, base_sin, base_sqrt, base_tan |
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__opeql_, base__opgtx__opeql_, base__opgtx_, base__opltx__opeql_, base__opltx_, base__opnot__opeql_, base_cos, base_expt, base_log, base_sin, base_sqrt, base_tan |
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_quote, meta_receive, meta_resolve, meta_respondsTo, meta_select, meta_send, meta_share |
Field Detail |
public static final NATFraction INFTY
public final double javaValue
Constructor Detail |
private NATFraction(double javaFrc)
Method Detail |
public static final NATFraction atValue(double javaFrc)
public NATFraction asNativeFraction()
asNativeFraction
in interface ATConversions
asNativeFraction
in class NATNil
public boolean equals(java.lang.Object other)
NATNil
equals
in class NATNil
public NATText meta_print() throws InterpreterException
ATObject
meta_print
in interface ATObject
meta_print
in class NATNil
InterpreterException
public ATTable meta_getStripes() throws InterpreterException
ATObject
meta_getStripes
in interface ATObject
meta_getStripes
in class NATNumeric
InterpreterException
protected double getJavaValue()
NATNumeric
getJavaValue
in class NATNumeric
public ATNumeric base_inc()
base_inc
in interface ATFraction
public ATNumeric base_dec()
base_dec
in interface ATFraction
public ATNumeric base_abs()
base_abs
in interface ATFraction
public ATNumber base_round()
base_round
in interface ATFraction
public ATNumber base_floor()
base_floor
in interface ATFraction
public ATNumber base_ceiling()
base_ceiling
in interface ATFraction
public ATNumeric base__oppls_(ATNumeric other) throws InterpreterException
base__oppls_
in interface ATNumeric
InterpreterException
public ATNumeric base_addNumber(ATNumber other) throws InterpreterException
base_addNumber
in interface ATNumeric
InterpreterException
public ATNumeric base_addFraction(ATFraction other) throws InterpreterException
base_addFraction
in interface ATNumeric
InterpreterException
public ATNumeric base__opmns_(ATNumeric other) throws InterpreterException
base__opmns_
in interface ATNumeric
InterpreterException
public ATNumeric base_subtractNumber(ATNumber other) throws InterpreterException
base_subtractNumber
in interface ATNumeric
InterpreterException
public ATNumeric base_subtractFraction(ATFraction other) throws InterpreterException
base_subtractFraction
in interface ATNumeric
InterpreterException
public ATNumeric base__optms_(ATNumeric other) throws InterpreterException
base__optms_
in interface ATNumeric
InterpreterException
public ATNumeric base_timesNumber(ATNumber other) throws InterpreterException
base_timesNumber
in interface ATNumeric
InterpreterException
public ATNumeric base_timesFraction(ATFraction other) throws InterpreterException
base_timesFraction
in interface ATNumeric
InterpreterException
public ATNumeric base__opdiv_(ATNumeric other) throws InterpreterException
base__opdiv_
in interface ATNumeric
InterpreterException
public ATNumeric base_divideNumber(ATNumber other) throws InterpreterException
base_divideNumber
in interface ATNumeric
InterpreterException
public ATNumeric base_divideFraction(ATFraction other) throws InterpreterException
base_divideFraction
in interface ATNumeric
InterpreterException
public ATNumeric base__opltx__opeql__opgtx_(ATNumeric other) throws InterpreterException
base__opltx__opeql__opgtx_
in interface ATNumeric
InterpreterException
public ATNumeric base_gequalsNumber(ATNumber other) throws InterpreterException
base_gequalsNumber
in interface ATNumeric
InterpreterException
public ATNumeric base_gequalsFraction(ATFraction other) throws InterpreterException
base_gequalsFraction
in interface ATNumeric
InterpreterException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |