public class RealValueImpl extends NumberValueImpl implements RealValue
INVALID_NAME
Constructor and Description |
---|
RealValueImpl(BigDecimal value) |
RealValueImpl(double value) |
asBagValue, asCollectionValue, asElement, asInteger, asIntegerValue, asMapValue, asNavigableObject, asObjectValue, asOrderedCollectionValue, asOrderedSetValue, asSequenceValue, asSetValue, asTupleValue, asUniqueCollectionValue, asUnlimitedNaturalValue, getTypeName, isInvalid, isUndefined, oclEquals, oclHashCode, toString
byteValue, shortValue
asBagValue, asCollectionValue, asElement, asInteger, asIntegerValue, asMapValue, asNavigableObject, asObjectValue, asOrderedCollectionValue, asOrderedSetValue, asSequenceValue, asSetValue, asTupleValue, asUniqueCollectionValue, asUnlimitedNaturalValue, isInvalid, isUndefined, toString
oclEquals, oclHashCode
public RealValueImpl(double value)
public RealValueImpl(BigDecimal value)
public static void initStatics()
public RealValue addInteger(IntegerValue rightValue)
addInteger
in interface RealValue
public Double asDouble()
asDouble
in interface Value
asDouble
in class NumberValueImpl
public Object asEcoreObject(IdResolver idResolver, Class<?> instanceClass)
Value
A thrown exception for an invalid OCL value.
Java-null for a null OCL value
Objects for other things, List<?> for collections
asEcoreObject
in interface Value
asEcoreObject
in class NumberValueImpl
public RealValue asRealValue()
asRealValue
in interface Value
asRealValue
in class NumberValueImpl
public Object asUnboxedObject(IdResolver idResolver)
Value
A thrown exception for an invalid OCL value.
Java-null for a null OCL value
Objects for other things, Bag/Set/OrderedSet/List for collections
asUnboxedObject
in interface Value
public BigDecimal bigDecimalValue()
bigDecimalValue
in interface RealValue
public BigInteger bigIntegerValue()
bigIntegerValue
in interface RealValue
public RealValue commutatedAdd(RealValue left)
commutatedAdd
in interface RealValue
public int commutatedCompareTo(ComparableValue<?> left)
ComparableValue
This is an internal method used to give righthand argument an opportunity to coerce its tyope to suit the lefthand. It is invoked when a direct compareTo is unable to compare left with this. Derived implementations must not invoke comoareTo in order to avoid an infinite commutation.
commutatedCompareTo
in interface ComparableValue<NumberValue>
public int commutatedCompareToInteger(IntegerValue left)
commutatedCompareToInteger
in interface NumberValue
public int commutatedCompareToReal(RealValue left)
commutatedCompareToReal
in interface NumberValue
public RealValue commutatedDivide(RealValue left)
commutatedDivide
in interface RealValue
public RealValue commutatedMultiply(RealValue left)
commutatedMultiply
in interface RealValue
public RealValue commutatedSubtract(RealValue left)
commutatedSubtract
in interface RealValue
public int compareTo(NumberValue right)
compareTo
in interface Comparable<NumberValue>
public RealValue divideInteger(IntegerValue right)
divideInteger
in interface RealValue
public RealValue divideReal(RealValue right)
divideReal
in interface RealValue
public double doubleValue()
doubleValue
in interface RealValue
doubleValue
in class Number
public float floatValue()
floatValue
in class Number
public IntegerValue floor()
public Type getType(StandardLibrary standardLibrary)
public TypeId getTypeId()
Value
public IntegerValue isIntegerValue()
isIntegerValue
in interface RealValue
public UnlimitedNaturalValue isUnlimitedNaturalValue()
isUnlimitedNaturalValue
in interface NumberValue
public RealValue maxInteger(IntegerValue rightValue)
maxInteger
in interface RealValue
public RealValue minInteger(IntegerValue rightValue)
minInteger
in interface RealValue
public RealValue multiplyInteger(IntegerValue rightValue)
multiplyInteger
in interface RealValue
public RealValue multiplyReal(RealValue rightValue)
multiplyReal
in interface RealValue
public IntegerValue round()
public RealValue subtractInteger(IntegerValue rightValue)
subtractInteger
in interface RealValue
public RealValue subtractReal(RealValue rightValue)
subtractReal
in interface RealValue
Copyright © 2005, 2018 IBM Corporation and others. All Rights Reserved.