com.rubecula.jquantity
Class Value

java.lang.Object
  |
  +--java.lang.Number
        |
        +--com.rubecula.jquantity.BaseNumber
              |
              +--com.rubecula.jquantity.MutableNumber
                    |
                    +--com.rubecula.jquantity.Rational
                          |
                          +--com.rubecula.jquantity.Value
All Implemented Interfaces:
Arithmetical, Arithmutable, Auditable, java.lang.Cloneable, java.lang.Comparable, Divisible, Estimable, Fuzzy, FuzzyMutable, Identifiable, Mutable, Normalizable, Presentable, java.io.Serializable, Trigonometrical, Typed

public class Value
extends Rational
implements Typed

This public class extends Rational by adding a type.

 This class is used to represent [dimensionless, non-complex] values.
 Value is either precise or has known, ie. bound, precision.
 There are two "values" which pertain to an instance of Value:
 
 
In the case of a Real-valued instance, the stored and effective values are equal.
A Value extends Rational and includes the following instance fields: ValueType _Type: a value which represents the type (context) of the value (for more detail, see the type definitions themselves in public constants below)

Version:
$Revision: 1.7 $
Author:
Robin Hillyard
See Also:
Serialized Form

Nested Class Summary
 class Value.ValueException
           
 
Nested classes inherited from class com.rubecula.jquantity.Rational
Rational.RValueException
 
Field Summary
(package private) static Value $1
           
(package private) static Value $2
           
(package private) static Value $Half
           
(package private) static Value $Pi
           
 
Fields inherited from class com.rubecula.jquantity.Rational
_Denominator, _Estimate, _Numerator, $_2Pi, $_c, $_degF, $_degR, $_Degree2Radian, $_Pi_12, $_Pi_2, $_Pi_4, $_Tan15Deg, $_Tan30Deg, $0, $1_2, $10, $12, $3, $6, $E, $Infinity, $MaxInt, $NaN, $Rt2, $Rt3, $Rt5, $S_Rt2, $S_Rt3, $S_Rt5
 
Fields inherited from class com.rubecula.jquantity.MutableNumber
$__1
 
Fields inherited from interface com.rubecula.jquantity.Fuzzy
$DistGaussian, $DistInvalid, $DistNone, $DistUniform, $Names
 
Constructor Summary
Value(Rational value)
          Constructor for a Value to extend an Rational with type RealAbs.
Value(Rational value, ValueType type)
          Alternative (almost primary) constructor for a Value.
 
Method Summary
 boolean absBound()
           
 void add(BaseNumber that)
          MUTATING Instance method to add another Arithmetical into this object.
(package private)  Value arctanTimes2(ValueType newType)
           
 Trigonometrical arctanX2()
          Method to evaluate the arctangent function.
 java.lang.String audit(java.lang.String label)
          Method to return a detailed string from an arithmetical object for debugging purposes.
 void cast(ValueType type)
          MUTATING METHOD! This method sets the type of the object to be type.
 Value casted(ValueType type)
          This method yields a copy of this but cast to be of type type.
protected  void cftest(java.io.PrintStream out, Integral check)
           
protected  void cftest(java.io.PrintStream out, java.lang.Object check)
           
 java.lang.Object clone()
          Creates and returns a copy of this object.
 int compareTo(Integral val)
          Compares this Value with the specified Integral.
 int compareTo(Value that)
          Compares this Rational with the specified Rational.
(package private)  boolean congruent(Value that)
           
 void convert()
          MUTATING METHOD! This method sets the type of the object to be type $RealAbs.
 void convert(ValueType type)
          MUTATING METHOD! This method sets the type of the object to be type.
 Value converted()
          This method yields a copy of this but converted to be of type ValueType.$RealAbs.
 Value converted(ValueType type)
          This method yields a copy of this but converted to be of type type.
protected  BaseNumber difference(BaseNumber subtrahend)
          Method to yield the difference of this less a BaseNumber (subtrahend).
(package private)  Value difference(Value x)
           
(package private)  Value difference(Value x, ValueType context)
           
 Value differenceValue(Value subtrahend)
          Method to yield the difference of this less a BaseNumber (subtrahend).
 void divide(BaseNumber divisor)
          MUTATING method to replace this by the quotient of this over divisor.
(package private)  double doubleValue(boolean forceRealContext)
           
 Trigonometrical exp()
          Method to evaluate the exponential function.
(package private)  Value exp(ValueType newType)
          Method for raising e to the power of this Value.
(package private)  Value fold(Value limit)
          Method to force this into a specific range.
(package private)  Value forceTypeReal()
          Method to form a version of this such that the type is Real (Rel or Abs).
(package private) static Value FullCircles(int n)
           
(package private)  Value gcd(Value that)
           
 double getBoundAbs(boolean absolute)
           
 double getRealValue()
          This method is used to get the the true value of this.
 ValueType getType()
          Method to get the type of this object.
 ValueType getTypeClass()
          Method to get the type class of this object.
 int hashCode()
           
 boolean hasSameClass(Rational other)
           
 boolean hasSameClass(ValueType type)
           
 Divisible inverse()
          Method to yield the reciprocal of this and return it as the result.
 Value inverseValue()
           
(package private)  boolean isEqual(Value that)
           
 boolean isExp()
          Conventience method to determine if this ValueType is of class Exp.
 boolean isLogAngle()
          Conventience method to determine if this ValueType is of class Log.
(package private)  boolean isParallel(Value that)
           
 boolean isReal()
          Method to determine if this is real-typed.
 Trigonometrical log()
          Method to evaluate the natural log function.
(package private)  Value log(ValueType newType)
           
static void main(java.lang.String[] args)
          Main method for testing this class.
 Value minusValue()
          Method to yield a copy of this but with the sign changed.
 void multiply(BaseNumber factor)
          MUTATING Instance method to multiply another BaseNumber into this object.
 void multiply(Value factor)
          MUTATING Instance method to multiply another Value into this object.
static Presentable Parse(Presentation x)
          Create a WholeNumber from a Presentation and return it as a Presentable.
(package private)  int places()
           
protected  BaseNumber pow(int power)
          Method to raise this to the power power return the result.
(package private)  Value power(int index)
           
(package private)  Value power(Value power)
           
(package private)  int precisionPlaces()
           
 Presentation present(AttrMap attributes)
          Convert this Presentable object into a Presentation, according to the set of attributes provided.
 Value productValue(Value multiplicand)
          Method to multiply multiplicand to this and return their product as the result.
 Value quotientValue(Value divisor)
           
 void raiseToPower(int x)
          MUTATING Instance method to raise this to power x.
(package private)  Value rootValue(int p)
           
 void scale(double factor)
          MUTATING Instance method to multiply this by a scale factor.
 void scale(long x)
          MUTATING Instance method to multiply this by a scale factor.
 void setType(ValueType type)
          Method to set the type of this object.
 Value sign(BaseNumber that)
           
(package private)  Value sqrt()
           
(package private)  Value square()
           
 Value sum(BaseNumber addend, ValueType context)
          Method to add addend to this and return their sum as the result.
 Value sum(Value that, ValueType context)
          Method to add addend to this and return their sum as the result.
 Value sumValue(BaseNumber addend)
          Method to add addend to this and return their sum as the result.
 Trigonometrical tan_theta_2()
          Method to evaluate the tangent function.
(package private)  Value tanThetaBy2(ValueType newType)
           
protected  void test(java.io.PrintStream out, Value check)
           
protected  void test(java.io.PrintStream out, Value check, java.lang.String label)
           
(package private)  void timesTenToPower(int power)
           
(package private)  Rational toRational()
          Method to narrows this object to a Rational, converting to a real context if necessary.
 java.lang.String toString()
          This is the default toString method for all BaseNumbers.
(package private)  java.lang.String toString(int style)
           
static Value toValue(NumberPresentation presentation)
          Factory method to create a non-angular Value from a NumberPresentation.
static Value toValue(NumberPresentation presentation, boolean angle)
          Factory method to create a (possibly angular) Value from a NumberPresentation.
(package private) static Value TwentyfourthCircles(int n)
           
 void updateRealEstimate()
          MUTATING METHOD! This method does not affect the critical values of this object.
static Value valueOfPowerOfTen(int x)
           
 
Methods inherited from class com.rubecula.jquantity.Rational
absRational, addTops, characteristic, Characteristic, compareTo, compareTo, differenceRational, doubleValue, expFloat, factor, floatValue, fold, getBottom, getBound, getBoundAbs, getDenominator, getDenominatorAsIntegral, getEstimate, GetExtraPrecisionDigits, getModel, getNumerator, getNumeratorAsIntegral, GetPrecisionPlaces, getTop, half, intValue, inverseRational, invert, isExact, isInfinite, isInteger, isNaN, isUnity, longValue, longValue, magnitude, makePresentableInstance, minus, minusRational, modulo, multFloat, multiplyTopAndBottom, negate, normalize, normalizeToBigDecimal, normalizeToInt, Parse, productRational, quotient, quotientRational, root, scaled, scaled, setBound, setBoundAbs, setModel, signum, squareRational, subtract, sumRational, TenToPower, toApproximation, toIntegral, toString, updateEstimate, valueOf, valueOf, valueOf, valueOf, valueOf, valueOf, valueOf, valueOf, valueOf, valueOf, valueOf, valueOf, valueOf, valueOf, valueOf, valueOfExponent, valueOfExponent, valueOfExponent, valueOfSquare
 
Methods inherited from class com.rubecula.jquantity.MutableNumber
factored, forcePositive, getIdentifier, isLong, product, setIdentifier, setIdentifierPost, setIdentifierPre, sum, test
 
Methods inherited from class com.rubecula.jquantity.BaseNumber
abs, audit, audit, bestModel, BestModel, Characteristic, compareTo, impartFuzziness, isEqual, isUncertain, isZero, present, test, test, valueOfLog10, Wrap
 
Methods inherited from class java.lang.Number
byteValue, shortValue
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

$Pi

static final Value $Pi

$2

static final Value $2

$1

static final Value $1

$Half

static final Value $Half
Constructor Detail

Value

public Value(Rational value,
             ValueType type)
Alternative (almost primary) constructor for a Value.

Parameters:
value - the object which will effectively be extended.
type - the type of the new object from the list: None,Angle,Log,RealAngle,RealAbs,RealRel,Exp.

Value

public Value(Rational value)
Constructor for a Value to extend an Rational with type RealAbs.

Parameters:
value - Rational: the object which will effectively be extended.
Method Detail

Parse

public static Presentable Parse(Presentation x)
Create a WholeNumber from a Presentation and return it as a Presentable.

Parameters:
x - A presentation which should be parsed to form a Presentable.
Returns:
A WholeNumber which corresponds to the x.

clone

public java.lang.Object clone()
Creates and returns a copy of this object.

Overrides:
clone in class Rational
Returns:
a clone of this instance.
Throws:
RationalException - : Rational not Cloneable (should be impossible)
See Also:
Cloneable

setType

public void setType(ValueType type)
Method to set the type of this object.

Specified by:
setType in interface Typed
Parameters:
type - the new type for this.

getType

public ValueType getType()
Method to get the type of this object.

Specified by:
getType in interface Typed
Returns:
the type of this.

getTypeClass

public ValueType getTypeClass()
Method to get the type class of this object.

Specified by:
getTypeClass in interface Typed
Returns:
the type-class of this, having one of the values:
  • ValueType.$ClassReal
  • ValueType.$ClassLog
  • ValueType.$ClassExp
  • ValueType.$ClassNone
.

isReal

public boolean isReal()
Method to determine if this is real-typed. Equivalent to getTypeClass()==ValueType.$ClassReal.

Specified by:
isReal in interface Typed
Returns:
true if the type of this object is of the real class.

cast

public void cast(ValueType type)
MUTATING METHOD! This method sets the type of the object to be type. The numerical setting(s) of the object remain unchanged, so that in general the equivalent value of this will change as a result.

Specified by:
cast in interface Typed
Parameters:
type - the new type.

convert

public void convert(ValueType type)
MUTATING METHOD! This method sets the type of the object to be type. The numerical setting(s) of the object will if necessary change in such a way that the true value of this remains unchanged.

Specified by:
convert in interface Typed
Parameters:
type - the new type.

getRealValue

public double getRealValue()
This method is used to get the the true value of this.

Specified by:
getRealValue in interface Typed
Returns:
this' true (effective) value.

updateRealEstimate

public void updateRealEstimate()
MUTATING METHOD! This method does not affect the critical values of this object. It updates the current real estimate (for debugging purposes).

Specified by:
updateRealEstimate in interface Typed

audit

public java.lang.String audit(java.lang.String label)
Method to return a detailed string from an arithmetical object for debugging purposes.

Specified by:
audit in interface Auditable
Overrides:
audit in class Rational
Parameters:
label - the label to associate with the data.
Returns:
the detailed string.

add

public void add(BaseNumber that)
MUTATING Instance method to add another Arithmetical into this object.

Specified by:
add in interface Arithmutable
Overrides:
add in class Rational
Parameters:
that - the addend.

multiply

public void multiply(BaseNumber factor)
              throws InvalidOperandException
MUTATING Instance method to multiply another BaseNumber into this object.
Under this form of multiplication, the effective values of the objects are multiplied together, rather than the stored values (as would be the case with the scale method).

Specified by:
multiply in interface Arithmutable
Overrides:
multiply in class Rational
Parameters:
factor - the multiplicand.
Throws:
InvalidOperandException - if that is not compatible with the multiply operation.

scale

public void scale(long x)
MUTATING Instance method to multiply this by a scale factor. Note that under this operation, the scaling (multiplication) is always directly on the value in this regardless of type.

Specified by:
scale in interface Arithmutable
Overrides:
scale in class Rational
Parameters:
x - the scale factor.

raiseToPower

public void raiseToPower(int x)
MUTATING Instance method to raise this to power x.

Specified by:
raiseToPower in interface Arithmutable
Overrides:
raiseToPower in class Rational
Parameters:
x - the number of times this should be multiplied by itself.

difference

protected BaseNumber difference(BaseNumber subtrahend)
                         throws InvalidOperandException
Method to yield the difference of this less a BaseNumber (subtrahend).
NOTE: it is a requirement of this method that the class of the result is the same as the class of this so that the result can be safely cast to the original class.

Overrides:
difference in class BaseNumber
Parameters:
subtrahend - the number to subtract from this.
Returns:
the difference of this less subtrahend.
Throws:
InvalidOperandException - if that is not compatible with the difference operation.

pow

protected BaseNumber pow(int power)
Method to raise this to the power power return the result.
NOTE: it is a requirement of this method that the class of the result is the same as the class of this so that the result can be safely cast to the original class.

Overrides:
pow in class Rational
Parameters:
power - the exponent for this.
Returns:
the value of this rraised to the power power.

multiply

public void multiply(Value factor)
              throws InvalidOperandException
MUTATING Instance method to multiply another Value into this object.
Under this form of multiplication, the effective values of the objects are multiplied together, rather than the stored values (as would be the case with the scale method).
Here's the logic:
    if this is real,
      then multiply the stored value by factor converted to type of
      this;
    else if factor is real,
      then #multiply(BaseNumber) by factor;
    else if both instances have same class and that class is log/angle,
      then add the stored value of factor into this;
    else
      convert this to a real and (recursively) multiply by factor.
 

Parameters:
factor - the multiplicand.
Throws:
InvalidOperandException - if that is not compatible with the multiply operation.

convert

public void convert()
MUTATING METHOD! This method sets the type of the object to be type $RealAbs. The numerical setting(s) of the object will if necessary change in such a way that the true value of this remains unchanged.


minusValue

public Value minusValue()
Method to yield a copy of this but with the sign changed.

Returns:
negative version of this.

sum

public Value sum(BaseNumber addend,
                 ValueType context)
Method to add addend to this and return their sum as the result.

Parameters:
addend - the number to add to this.
context - the context (a ValueType) in which the sum is to be performed.
Returns:
the sum of this and addend.

sum

public Value sum(Value that,
                 ValueType context)
Method to add addend to this and return their sum as the result.
Numerically, then if the result in a real context [as opposed to log/exp], it is the sum of the operands ... but if the result is in the log/angle domain, it is still the sum of the operands but note that the result in the log case will be equivalent to multiplication and in the angle case will be rotation Adding exp values in an exp context does not make much sense. Context must match _Type of either this or that.

Parameters:
that - the number to add to this.
context - the context (a ValueType) in which the sum is to be performed.
Returns:
the sum of this and that.

sumValue

public Value sumValue(BaseNumber addend)
Method to add addend to this and return their sum as the result.

Parameters:
addend - the number to add to this.
Returns:
the sum of this and addend.

differenceValue

public Value differenceValue(Value subtrahend)
Method to yield the difference of this less a BaseNumber (subtrahend).

Parameters:
subtrahend - the number to subtract from this.
Returns:
the difference of this less subtrahend.

productValue

public Value productValue(Value multiplicand)
Method to multiply multiplicand to this and return their product as the result.

Parameters:
multiplicand - the number to add to this.
Returns:
the product of this and multiplicand.

scale

public void scale(double factor)
MUTATING Instance method to multiply this by a scale factor. Note that under this operation, the scaling (multiplication) is always directly on the value in this regardless of type.

Overrides:
scale in class Rational
Parameters:
factor - the scale factor.

divide

public void divide(BaseNumber divisor)
            throws InvalidOperandException
MUTATING method to replace this by the quotient of this over divisor.

Overrides:
divide in class Rational
Parameters:
divisor - the value to be divided into this.
Throws:
InvalidOperandException - if that is not compatible with the divide operation.

inverse

public Divisible inverse()
Method to yield the reciprocal of this and return it as the result.
NOTE: it is a requirement of this method that the class of the result is the same as the class of this so that the result can be safely cast to the original class.

Specified by:
inverse in interface Divisible
Overrides:
inverse in class Rational
Returns:
the reciprocal of this.

converted

public Value converted(ValueType type)
This method yields a copy of this but converted to be of type type.

Parameters:
type - the new type.
Returns:
a Value whose real value is the same as that of this but with type type.

converted

public Value converted()
This method yields a copy of this but converted to be of type ValueType.$RealAbs.

Returns:
a Value whose real/effective (not stored) value is the same as that of this but with type ValueType.$RealAbs.

casted

public Value casted(ValueType type)
This method yields a copy of this but cast to be of type type.
Note: yes, I know that casted is not good English. Sorry.

Parameters:
type - the type to be forced in.
Returns:
a copy of this cast to type.

quotientValue

public Value quotientValue(Value divisor)

compareTo

public int compareTo(Value that)
Compares this Rational with the specified Rational. This method is provided in preference to individual methods for each of the six boolean comparison operators (<, ==, >, >=, !=, <=). The suggested idiom for performing these comparisons is: (x.compareTo(y) <op> 0), where <op> is one of the six comparison operators.
This compares the values only - ignores types, etc. Careful!!

Parameters:
that - Rational to which this Rational is to be compared.
Returns:
-1, 0 or 1 as this Rational is numerically less than, equal to, or greater than val.

compareTo

public int compareTo(Integral val)
Compares this Value with the specified Integral. This method is provided in preference to individual methods for each of the six boolean comparison operators (<, ==, >, >=, !=, <=). The suggested idiom for performing these comparisons is: (x.compareTo(y) <op> 0), where <op> is one of the six comparison operators.

Overrides:
compareTo in class Rational
Parameters:
val - Integral to which this Integral is to be compared.
Returns:
-1, 0 or 1 as this Value is numerically less than, equal to, or greater than val.

congruent

final boolean congruent(Value that)

isEqual

final boolean isEqual(Value that)

doubleValue

final double doubleValue(boolean forceRealContext)
                  throws JQuantityException
JQuantityException

exp

public Trigonometrical exp()
Method to evaluate the exponential function. This method is the inverse of log().

Specified by:
exp in interface Trigonometrical
Overrides:
exp in class Rational
Returns:
e(this).

log

public Trigonometrical log()
Method to evaluate the natural log function. This method is the inverse of exp().

Specified by:
log in interface Trigonometrical
Overrides:
log in class Rational
Returns:
log(this).

arctanX2

public Trigonometrical arctanX2()
Method to evaluate the arctangent function. This method is the inverse of tan_theta_2().

Specified by:
arctanX2 in interface Trigonometrical
Overrides:
arctanX2 in class Rational
Returns:
2 * atan(this).

tan_theta_2

public Trigonometrical tan_theta_2()
Method to evaluate the tangent function. This method is the inverse of arctanX2().

Specified by:
tan_theta_2 in interface Trigonometrical
Overrides:
tan_theta_2 in class Rational
Returns:
tan(this/2);

arctanTimes2

final Value arctanTimes2(ValueType newType)
                  throws JQuantityException
JQuantityException

exp

final Value exp(ValueType newType)
         throws JQuantityException
Method for raising e to the power of this Value. It is assumed that the current types of "this"/"newType" are Log/Real or Real/Exp The appropriate calculations are made.

Parameters:
newType - The required type for the new object.
Returns:
"e" raised to power of this.
Throws:
JQuantityException

gcd

final Value gcd(Value that)
         throws JQuantityException
JQuantityException

getBoundAbs

public double getBoundAbs(boolean absolute)

hasSameClass

public boolean hasSameClass(Rational other)

hasSameClass

public boolean hasSameClass(ValueType type)

isLogAngle

public boolean isLogAngle()
Conventience method to determine if this ValueType is of class Log.

Returns:
true if type class of this is ClassLog.

isExp

public boolean isExp()
Conventience method to determine if this ValueType is of class Exp.

Returns:
true if type class of this is ClassExp.

absBound

public boolean absBound()

hashCode

public int hashCode()
Overrides:
hashCode in class Rational

inverseValue

public final Value inverseValue()

isParallel

final boolean isParallel(Value that)
                  throws JQuantityException
JQuantityException

log

final Value log(ValueType newType)
         throws JQuantityException
JQuantityException

places

final int places()
          throws JQuantityException
Overrides:
places in class Rational
JQuantityException

power

final Value power(int index)
           throws JQuantityException
JQuantityException

power

final Value power(Value power)
           throws JQuantityException
JQuantityException

sign

public final Value sign(BaseNumber that)

sqrt

final Value sqrt()
          throws JQuantityException
JQuantityException

rootValue

final Value rootValue(int p)
               throws JQuantityException
JQuantityException

timesTenToPower

void timesTenToPower(int power)
Overrides:
timesTenToPower in class Rational

difference

final Value difference(Value x,
                       ValueType context)
                throws JQuantityException
JQuantityException

difference

final Value difference(Value x)
                throws JQuantityException
JQuantityException

fold

Value fold(Value limit)
     throws JQuantityException
Method to force this into a specific range. This can therefore be in radians, angles, right-angles, whatever.

Parameters:
limit - defines the range (-limit < magnitude <= +limit).
Returns:
a copy of this, incremented appropriately so that magnitude is in range.
Throws:
JQuantityException - Value.fold(Value): cannot fold by different type.

tanThetaBy2

final Value tanThetaBy2(ValueType newType)
                 throws JQuantityException
JQuantityException

toRational

final Rational toRational()
Method to narrows this object to a Rational, converting to a real context if necessary.

Returns:
the Rational with equivalent value to this.

forceTypeReal

final Value forceTypeReal()
Method to form a version of this such that the type is Real (Rel or Abs). If the type has to be changed, a clone will be returned, otherwise this is returned unchanged.

Returns:
a version of this with a real type.

precisionPlaces

final int precisionPlaces()
                   throws JQuantityException
JQuantityException

square

final Value square()
            throws JQuantityException
JQuantityException

toString

final java.lang.String toString(int style)

toString

public final java.lang.String toString()
Description copied from class: BaseNumber
This is the default toString method for all BaseNumbers. Specific classes will override as appropriate.

Overrides:
toString in class Rational
Returns:
a String representing this BaseNumber

present

public Presentation present(AttrMap attributes)
                     throws PresentationException
Description copied from class: Rational
Convert this Presentable object into a Presentation, according to the set of attributes provided.

Specified by:
present in interface Presentable
Overrides:
present in class Rational
Parameters:
attributes - the map of attributes required for the resulting presentation.
Returns:
an appropriate presentation of this quantity.
Throws:
PresentationException - if unable to parse appropriately.

valueOfPowerOfTen

public static Value valueOfPowerOfTen(int x)

toValue

public static Value toValue(NumberPresentation presentation,
                            boolean angle)
                     throws JQuantityException
Factory method to create a (possibly angular) Value from a NumberPresentation.

Parameters:
presentation - the representation of desired Value.
angle - whether the new Value is angular or not.
Returns:
a newly-minted Value based on the value of presentation.
Throws:
JQuantityException

toValue

public static Value toValue(NumberPresentation presentation)
                     throws JQuantityException
Factory method to create a non-angular Value from a NumberPresentation.

Parameters:
presentation - the representation of desired Value.
Returns:
a newly-minted Value based on the value of presentation.
Throws:
JQuantityException

TwentyfourthCircles

static final Value TwentyfourthCircles(int n)

FullCircles

static final Value FullCircles(int n)

cftest

protected void cftest(java.io.PrintStream out,
                      java.lang.Object check)

cftest

protected void cftest(java.io.PrintStream out,
                      Integral check)

test

protected void test(java.io.PrintStream out,
                    Value check,
                    java.lang.String label)

test

protected void test(java.io.PrintStream out,
                    Value check)

main

public static void main(java.lang.String[] args)
Main method for testing this class.

Parameters:
args - String[] : the command line options.