org.eclipse.ocl.examples.domain.values.impl
Class RealValueImpl

java.lang.Object
  extended by java.lang.Number
      extended by org.eclipse.ocl.examples.domain.values.impl.NumberValueImpl
          extended by org.eclipse.ocl.examples.domain.values.impl.RealValueImpl
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<RealValue>, OCLValue, RealValue, Value

public class RealValueImpl
extends NumberValueImpl
implements RealValue

See Also:
Serialized Form
Generated
NOT

Field Summary
 
Fields inherited from interface org.eclipse.ocl.examples.domain.values.Value
INVALID_NAME
 
Constructor Summary
RealValueImpl(java.math.BigDecimal value)
           
RealValueImpl(double value)
           
 
Method Summary
 RealValue abs()
           
 RealValue addInteger(IntegerValue rightValue)
           
 RealValue addReal(RealValue rightValue)
           
 java.lang.Double asDouble()
           
 java.lang.Object asEcoreObject(IdResolver idResolver)
           
 java.lang.Number asNumber()
           
 java.lang.Object asObject()
           
 RealValue asRealValue()
           
 java.math.BigDecimal bigDecimalValue()
           
 java.math.BigInteger bigIntegerValue()
           
 RealValue commutatedAdd(RealValue left)
           
 RealValue commutatedDivide(RealValue left)
           
 RealValue commutatedMultiply(RealValue left)
           
 RealValue commutatedSubtract(RealValue left)
           
 int compareTo(RealValue left)
           
 int compareToInteger(IntegerValue o)
           
 int compareToReal(RealValue o)
           
 int compareToUnlimited(UnlimitedValue right)
           
protected static RealValue divideBigDecimal(java.math.BigDecimal left, java.math.BigDecimal right)
           
 RealValue divideInteger(IntegerValue right)
           
 RealValue divideReal(RealValue right)
           
 double doubleValue()
           
 boolean equals(java.lang.Object obj)
           
protected  org.eclipse.emf.ecore.EClass eStaticClass()
           
 float floatValue()
           
 IntegerValue floor()
           
protected  java.lang.Object getIntegerValue()
           
 DomainType getType(DomainStandardLibrary standardLibrary)
           
 TypeId getTypeId()
          Return the type of this value determined from its construction context.
 int hashCode()
           
static void initStatics()
          A simple public static method that may be used to force class initialization.
 int intValue()
           
 IntegerValue isIntegerValue()
           
 boolean isUnlimited()
           
 long longValue()
           
 RealValue max(RealValue rightValue)
           
 RealValue maxInteger(IntegerValue rightValue)
           
 RealValue maxReal(RealValue rightValue)
           
 RealValue maxUnlimited(UnlimitedValue rightValue)
           
 RealValue min(RealValue rightValue)
           
 RealValue minInteger(IntegerValue rightValue)
           
 RealValue minReal(RealValue rightValue)
           
 RealValue minUnlimited(UnlimitedValue rightValue)
           
 RealValue multiplyInteger(IntegerValue rightValue)
           
 RealValue multiplyReal(RealValue rightValue)
           
 RealValue negate()
           
 IntegerValue round()
           
 int signum()
           
 RealValue subtractInteger(IntegerValue rightValue)
           
 RealValue subtractReal(RealValue rightValue)
           
 java.lang.String toString()
           
 
Methods inherited from class org.eclipse.ocl.examples.domain.values.impl.NumberValueImpl
asBagValue, asCollectionValue, asEcoreObject, asElement, asInteger, asIntegerValue, asNavigableObject, asObjectValue, asOrderedCollectionValue, asOrderedSetValue, asSequenceValue, asSetValue, asTupleValue, asUniqueCollectionValue, asUnlimitedNaturalValue, getTypeName, isInvalid, isUndefined, oclEquals, oclHashCode, toString
 
Methods inherited from class java.lang.Number
byteValue, shortValue
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.eclipse.ocl.examples.domain.values.Value
asBagValue, asCollectionValue, asEcoreObject, asElement, asInteger, asIntegerValue, asNavigableObject, asObjectValue, asOrderedCollectionValue, asOrderedSetValue, asSequenceValue, asSetValue, asTupleValue, asUniqueCollectionValue, asUnlimitedNaturalValue, isInvalid, isUndefined, toString
 
Methods inherited from interface org.eclipse.ocl.examples.domain.values.OCLValue
oclEquals, oclHashCode
 

Constructor Detail

RealValueImpl

public RealValueImpl(double value)

RealValueImpl

public RealValueImpl(@NonNull
                     java.math.BigDecimal value)
Method Detail

eStaticClass

protected org.eclipse.emf.ecore.EClass eStaticClass()

Overrides:
eStaticClass in class NumberValueImpl
Generated

divideBigDecimal

@NonNull
protected static RealValue divideBigDecimal(@NonNull
                                                    java.math.BigDecimal left,
                                                    @NonNull
                                                    java.math.BigDecimal right)

initStatics

public static void initStatics()
A simple public static method that may be used to force class initialization.


abs

@NonNull
public RealValue abs()
Specified by:
abs in interface RealValue

addInteger

@NonNull
public RealValue addInteger(@NonNull
                                    IntegerValue rightValue)
Specified by:
addInteger in interface RealValue

addReal

@NonNull
public RealValue addReal(@NonNull
                                 RealValue rightValue)
Specified by:
addReal in interface RealValue

asDouble

@NonNull
public java.lang.Double asDouble()
Specified by:
asDouble in interface Value
Overrides:
asDouble in class NumberValueImpl

asEcoreObject

@NonNull
public java.lang.Object asEcoreObject(@NonNull
                                              IdResolver idResolver)
Specified by:
asEcoreObject in interface Value

asNumber

@NonNull
public java.lang.Number asNumber()
Specified by:
asNumber in interface RealValue

asObject

@NonNull
public java.lang.Object asObject()
Specified by:
asObject in interface Value

asRealValue

@NonNull
public RealValue asRealValue()
Specified by:
asRealValue in interface Value
Overrides:
asRealValue in class NumberValueImpl

bigDecimalValue

@NonNull
public java.math.BigDecimal bigDecimalValue()
Specified by:
bigDecimalValue in interface RealValue

bigIntegerValue

@NonNull
public java.math.BigInteger bigIntegerValue()
Specified by:
bigIntegerValue in interface RealValue

commutatedAdd

@NonNull
public RealValue commutatedAdd(@NonNull
                                       RealValue left)
Specified by:
commutatedAdd in interface RealValue

commutatedDivide

@NonNull
public RealValue commutatedDivide(@NonNull
                                          RealValue left)
Specified by:
commutatedDivide in interface RealValue

commutatedMultiply

@NonNull
public RealValue commutatedMultiply(@NonNull
                                            RealValue left)
Specified by:
commutatedMultiply in interface RealValue

commutatedSubtract

@NonNull
public RealValue commutatedSubtract(@NonNull
                                            RealValue left)
Specified by:
commutatedSubtract in interface RealValue

compareTo

public int compareTo(RealValue left)
Specified by:
compareTo in interface java.lang.Comparable<RealValue>

compareToInteger

public int compareToInteger(@NonNull
                            IntegerValue o)
Specified by:
compareToInteger in interface RealValue

compareToReal

public int compareToReal(@NonNull
                         RealValue o)
Specified by:
compareToReal in interface RealValue

compareToUnlimited

public int compareToUnlimited(@NonNull
                              UnlimitedValue right)
Specified by:
compareToUnlimited in interface RealValue

divideInteger

@NonNull
public RealValue divideInteger(@NonNull
                                       IntegerValue right)
Specified by:
divideInteger in interface RealValue

divideReal

@NonNull
public RealValue divideReal(@NonNull
                                    RealValue right)
Specified by:
divideReal in interface RealValue

doubleValue

public double doubleValue()
Specified by:
doubleValue in interface RealValue
Specified by:
doubleValue in class java.lang.Number

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object

floatValue

public float floatValue()
Specified by:
floatValue in class java.lang.Number

floor

@NonNull
public IntegerValue floor()
Specified by:
floor in interface RealValue

getIntegerValue

protected java.lang.Object getIntegerValue()

getType

@NonNull
public DomainType getType(@NonNull
                                  DomainStandardLibrary standardLibrary)

getTypeId

@NonNull
public TypeId getTypeId()
Description copied from interface: Value
Return the type of this value determined from its construction context. In the case of collections this may differ from the actual type.

Specified by:
getTypeId in interface Value

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

intValue

public int intValue()
Specified by:
intValue in class java.lang.Number

isIntegerValue

@Nullable
public IntegerValue isIntegerValue()
Specified by:
isIntegerValue in interface RealValue

isUnlimited

public boolean isUnlimited()
Specified by:
isUnlimited in interface RealValue

longValue

public long longValue()
Specified by:
longValue in class java.lang.Number

max

@NonNull
public RealValue max(@NonNull
                             RealValue rightValue)
Specified by:
max in interface RealValue

maxInteger

@NonNull
public RealValue maxInteger(@NonNull
                                    IntegerValue rightValue)
Specified by:
maxInteger in interface RealValue

maxReal

@NonNull
public RealValue maxReal(@NonNull
                                 RealValue rightValue)
Specified by:
maxReal in interface RealValue

maxUnlimited

@NonNull
public RealValue maxUnlimited(@NonNull
                                      UnlimitedValue rightValue)
Specified by:
maxUnlimited in interface RealValue

min

@NonNull
public RealValue min(@NonNull
                             RealValue rightValue)
Specified by:
min in interface RealValue

minInteger

@NonNull
public RealValue minInteger(@NonNull
                                    IntegerValue rightValue)
Specified by:
minInteger in interface RealValue

minReal

@NonNull
public RealValue minReal(@NonNull
                                 RealValue rightValue)
Specified by:
minReal in interface RealValue

minUnlimited

@NonNull
public RealValue minUnlimited(@NonNull
                                      UnlimitedValue rightValue)
Specified by:
minUnlimited in interface RealValue

multiplyInteger

@NonNull
public RealValue multiplyInteger(@NonNull
                                         IntegerValue rightValue)
Specified by:
multiplyInteger in interface RealValue

multiplyReal

@NonNull
public RealValue multiplyReal(@NonNull
                                      RealValue rightValue)
Specified by:
multiplyReal in interface RealValue

negate

@NonNull
public RealValue negate()
Specified by:
negate in interface RealValue

round

@NonNull
public IntegerValue round()
Specified by:
round in interface RealValue

signum

public int signum()
Specified by:
signum in interface RealValue

subtractInteger

@NonNull
public RealValue subtractInteger(@NonNull
                                         IntegerValue rightValue)
Specified by:
subtractInteger in interface RealValue

subtractReal

@NonNull
public RealValue subtractReal(@NonNull
                                      RealValue rightValue)
Specified by:
subtractReal in interface RealValue

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object