|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--java.lang.Number
|
+--com.rubecula.jquantity.BaseNumber
|
+--com.rubecula.jquantity.Manifest
|
+--com.rubecula.jquantity.ValueType
This public final class extends Manifest to define types for Values.
| Field Summary | |
(package private) static ValueType |
$Angle
|
(package private) static ValueType |
$ClassExp
|
(package private) static ValueType |
$ClassLog
|
(package private) static java.lang.String[] |
$ClassNamesFull
|
(package private) static ValueType |
$ClassNone
|
(package private) static ValueType |
$ClassReal
|
(package private) static ValueType |
$Exp
|
(package private) static ValueType |
$Log
|
(package private) static ValueType |
$None
|
(package private) static ValueType |
$RealAbs
|
(package private) static ValueType |
$RealAngle
|
(package private) static ValueType |
$RealRel
|
(package private) static java.lang.String[] |
$TypeNamesBrief
|
(package private) static java.lang.String[] |
$TypeNamesFull
|
(package private) static ValueType |
COMPLEX_POLAR
|
(package private) static int |
Conversion_arctanTimes2
|
(package private) static int |
Conversion_exp
|
(package private) static int |
Conversion_log
|
(package private) static int |
Conversion_none
Constants defined for conversion operations. |
(package private) static int |
Conversion_product
|
(package private) static int |
Conversion_quotient
|
(package private) static int |
Conversion_RealAbs
|
(package private) static int |
Conversion_RealRel
|
(package private) static int |
Conversion_special
|
(package private) static int |
Conversion_tanThetaBy2
|
| Fields inherited from class com.rubecula.jquantity.Manifest |
$__1, $0, $1, $10, $10L, $2, $3 |
| Fields inherited from interface com.rubecula.jquantity.Fuzzy |
$DistGaussian, $DistInvalid, $DistNone, $DistUniform, $Names |
| Constructor Summary | |
ValueType(int type)
Constructor to create a new ValueType based on value type. |
|
| Method Summary | |
boolean |
absBoundType()
Method to determine if this type goes with absolute bounds in a TValue. |
java.lang.String |
audit(java.lang.String label)
Method to return a detailed string from an object for debugging purposes. |
boolean |
canCast(ValueType to)
Method returns true if it is legal to cast a value of type from to type to Identities are considered uncastable Note that casting always changes the effective value, without changing the correponding value shown |
(package private) int |
conversion(ValueType newType)
|
(package private) ValueType |
getCastingType()
|
java.lang.String |
getIdentifier()
Method to get the specific identifier for an object. |
(package private) ValueType |
getTypeClass()
|
(package private) boolean |
hasSameClass(ValueType other)
Method to determine of two ValueTypes are of same class. |
boolean |
isAngular()
Convenience method to determine if this ValueType is of class Angle or Real Angle. |
boolean |
isExp()
Convenience method to determine if this ValueType is of class Exp. |
boolean |
isLogAngle()
Convenience method to determine if this ValueType is of class Log. |
boolean |
isReal()
Convenience method to determine if this ValueType is of class Real. |
java.lang.String |
toString()
This is the default toString method for all BaseNumbers. |
static ValueType |
valueOf(java.lang.String type)
Get a ValueType based on a string representation. |
| Methods inherited from class com.rubecula.jquantity.Manifest |
audit, audit, compareTo, compareTo, compareTo, difference, doubleValue, factored, floatValue, intValue, isInfinite, isInteger, isPowerOfTen, isUnity, longValue, makePresentableInstance, minus, pow, present, product, scaled, signum, sum, toBigInteger |
| Methods inherited from class com.rubecula.jquantity.BaseNumber |
abs, bestModel, BestModel, Characteristic, compareTo, getBound, getBoundAbs, getModel, impartFuzziness, isEqual, isExact, isUncertain, isZero, present, test, test, valueOfLog10, Wrap |
| Methods inherited from class java.lang.Number |
byteValue, shortValue |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface com.rubecula.jquantity.Integral |
isExact, isZero |
| Field Detail |
static final java.lang.String[] $TypeNamesBrief
static final java.lang.String[] $TypeNamesFull
static final java.lang.String[] $ClassNamesFull
static final ValueType $None
static final ValueType $Angle
static final ValueType $Log
static final ValueType $RealAngle
static final ValueType $RealAbs
static final ValueType $RealRel
static final ValueType $Exp
static final ValueType $ClassNone
static final ValueType $ClassReal
static final ValueType $ClassLog
static final ValueType $ClassExp
static final ValueType COMPLEX_POLAR
static final int Conversion_none
static final int Conversion_exp
static final int Conversion_tanThetaBy2
static final int Conversion_log
static final int Conversion_arctanTimes2
static final int Conversion_RealRel
static final int Conversion_RealAbs
static final int Conversion_quotient
static final int Conversion_product
static final int Conversion_special
| Constructor Detail |
public ValueType(int type)
type - an integer to distinguish types.| Method Detail |
public static ValueType valueOf(java.lang.String type)
type - the string form of the type.
public boolean isReal()
public boolean isLogAngle()
public boolean isAngular()
#Angle or
#RealAngle.public boolean isExp()
final boolean hasSameClass(ValueType other)
other - the ValueType to compare.
final ValueType getTypeClass()
final ValueType getCastingType()
final int conversion(ValueType newType)
public final boolean canCast(ValueType to)
to - the type to which a Value might be cast.
public final boolean absBoundType()
public java.lang.String toString()
BaseNumber
toString in class Manifestpublic java.lang.String getIdentifier()
getIdentifier in interface AuditablegetIdentifier in class Manifestpublic java.lang.String audit(java.lang.String label)
audit in interface Auditableaudit in class Manifestlabel - String: the label to associate with the data
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||