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

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.lang.RuntimeException
              extended by org.eclipse.ocl.examples.domain.evaluation.DomainException
                  extended by org.eclipse.ocl.examples.domain.values.impl.UndefinedValueImpl
                      extended by org.eclipse.ocl.examples.domain.values.impl.NullValueImpl
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<RealValue>, java.lang.Iterable<java.lang.Object>, BagValue, CollectionValue, IntegerValue, NullValue, ObjectValue, OCLValue, OrderedCollectionValue, OrderedSetValue, RealValue, SequenceValue, SetValue, TupleValue, UniqueCollectionValue, UnlimitedValue, Value

public class NullValueImpl
extends UndefinedValueImpl
implements NullValue

An InvalidValueException wraps an InvalidValue and is used to return the InvalidValue to the caller. Exceptions are a is thrown when an Invalid Value arises during an evaluation, and when no EvaluationEnvironment is available to support throwing an InvalidEvaluationException. When such an environment is available the InvalidValueException is rethrown as an InvalidEvaluationException. * @generated NOT

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.eclipse.ocl.examples.domain.values.IntegerValue
IntegerValue.Accumulator
 
Nested classes/interfaces inherited from interface org.eclipse.ocl.examples.domain.values.BagValue
BagValue.Accumulator
 
Nested classes/interfaces inherited from interface org.eclipse.ocl.examples.domain.values.OrderedSetValue
OrderedSetValue.Accumulator
 
Nested classes/interfaces inherited from interface org.eclipse.ocl.examples.domain.values.SequenceValue
SequenceValue.Accumulator
 
Nested classes/interfaces inherited from interface org.eclipse.ocl.examples.domain.values.SetValue
SetValue.Accumulator
 
Field Summary
 
Fields inherited from interface org.eclipse.ocl.examples.domain.values.Value
INVALID_NAME
 
Constructor Summary
NullValueImpl()
           
 
Method Summary
 java.util.List<java.lang.Object> asEcoreObject()
          Deprecated. 
 java.util.List<java.lang.Object> asEcoreObject(IdResolver idResolver)
           
 DomainElement asElement()
           
 boolean equals(java.lang.Object obj)
           
protected  org.eclipse.emf.ecore.EClass eStaticClass()
           
 DomainType getType(DomainStandardLibrary standardLibrary)
           
 OclVoidTypeId getTypeId()
          Return the type of this value determined from its construction context.
 int hashCode()
           
 int intValue()
           
 boolean isInvalid()
           
 boolean oclEquals(OCLValue thatValue)
          Return true if this is an equivalent OCL value to thatValue.
 int oclHashCode()
           
 java.lang.String toString()
           
 
Methods inherited from class org.eclipse.ocl.examples.domain.values.impl.UndefinedValueImpl
abs, addInteger, addReal, append, appendAll, asBagValue, asCollection, asCollectionValue, asDouble, asEcoreObjects, asInteger, asIntegerValue, asList, asNavigableObject, asNumber, asObject, asObjectValue, asOrderedCollectionValue, asOrderedSetValue, asRealValue, asSequenceValue, asSetValue, asTupleValue, asUniqueCollectionValue, asUnlimitedNaturalValue, at, bigDecimalValue, bigIntegerValue, commutatedAdd, commutatedDiv, commutatedDivide, commutatedMod, commutatedMultiply, commutatedSubtract, compareTo, compareToInteger, compareToReal, compareToUnlimited, count, createNew, div, divideInteger, divideReal, divInteger, divUnlimited, doubleValue, excludes, excludesAll, excluding, excludingAll, first, flatten, flatten, floor, getElement, getElements, getInstanceType, getKind, getObject, getTypeName, getValue, getValue, includes, includesAll, including, includingAll, indexOf, insertAt, intersection, intSize, isEmpty, isFalse, isIntegerValue, isOrdered, isTrue, isUndefined, isUnique, isUnlimited, isUnlimitedNatural, iterable, iterator, last, max, maxInteger, maxReal, maxUnlimited, min, minInteger, minReal, minUnlimited, minus, modInteger, modUnlimited, multiplyInteger, multiplyReal, negate, notEmpty, prepend, prependAll, product, reverse, round, signum, size, sort, stringValue, subOrderedSet, subSequence, subtractInteger, subtractReal, symmetricDifference, toInvalidValue, toSequenceValue, toString, union
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace
 
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.NullValue
negate
 
Methods inherited from interface org.eclipse.ocl.examples.domain.values.ObjectValue
getObject
 
Methods inherited from interface org.eclipse.ocl.examples.domain.values.IntegerValue
addInteger, commutatedDiv, commutatedMod, compareToInteger, divideInteger, divInteger, divUnlimited, isUnlimitedNatural, maxInteger, minInteger, modInteger, modUnlimited, multiplyInteger, subtractInteger
 
Methods inherited from interface org.eclipse.ocl.examples.domain.values.RealValue
abs, addReal, asNumber, bigDecimalValue, bigIntegerValue, commutatedAdd, commutatedDivide, commutatedMultiply, commutatedSubtract, compareToReal, compareToUnlimited, divideReal, doubleValue, floor, isIntegerValue, isUnlimited, max, maxReal, maxUnlimited, min, minReal, minUnlimited, multiplyReal, round, signum, subtractReal
 
Methods inherited from interface java.lang.Comparable
compareTo
 
Methods inherited from interface org.eclipse.ocl.examples.domain.values.OrderedSetValue
subOrderedSet
 
Methods inherited from interface org.eclipse.ocl.examples.domain.values.SequenceValue
subSequence
 
Methods inherited from interface org.eclipse.ocl.examples.domain.values.OrderedCollectionValue
append, appendAll, at, first, indexOf, insertAt, last, prepend, prependAll, reverse
 
Methods inherited from interface org.eclipse.ocl.examples.domain.values.UniqueCollectionValue
minus, symmetricDifference
 
Methods inherited from interface org.eclipse.ocl.examples.domain.values.CollectionValue
asCollection, asEcoreObjects, count, excludes, excludesAll, excluding, excludingAll, flatten, flatten, getElements, getKind, includes, includesAll, including, includingAll, intersection, intSize, isEmpty, isOrdered, isUnique, iterable, iterator, notEmpty, product, size, sort, toSequenceValue, union
 
Methods inherited from interface org.eclipse.ocl.examples.domain.values.Value
asBagValue, asCollectionValue, asDouble, asInteger, asIntegerValue, asNavigableObject, asObject, asObjectValue, asOrderedCollectionValue, asOrderedSetValue, asRealValue, asSequenceValue, asSetValue, asTupleValue, asUniqueCollectionValue, asUnlimitedNaturalValue, isUndefined, toString
 
Methods inherited from interface org.eclipse.ocl.examples.domain.values.TupleValue
getValue, getValue
 

Constructor Detail

NullValueImpl

public NullValueImpl()
Method Detail

eStaticClass

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

Generated

asEcoreObject

@Deprecated
public java.util.List<java.lang.Object> asEcoreObject()
Deprecated. 

Description copied from interface: Value
Return the Ecore representation of this value.

An thrown exception for an invalid OCL value.

Java-null for a null OCL value

Objects for other things

Specified by:
asEcoreObject in interface CollectionValue
Specified by:
asEcoreObject in interface Value

asEcoreObject

public java.util.List<java.lang.Object> asEcoreObject(@NonNull
                                                      IdResolver idResolver)
Specified by:
asEcoreObject in interface CollectionValue
Specified by:
asEcoreObject in interface Value

asElement

public DomainElement asElement()
Specified by:
asElement in interface Value

equals

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

getType

@NonNull
public DomainType getType(@NonNull
                                  DomainStandardLibrary standardLibrary)

getTypeId

@NonNull
public OclVoidTypeId 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 CollectionValue
Specified by:
getTypeId in interface NullValue
Specified by:
getTypeId in interface TupleValue
Specified by:
getTypeId in interface Value
Specified by:
getTypeId in class UndefinedValueImpl
Returns:
its type

hashCode

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

intValue

public int intValue()
Specified by:
intValue in interface IntegerValue

isInvalid

public boolean isInvalid()
Specified by:
isInvalid in interface Value

oclEquals

public boolean oclEquals(@NonNull
                         OCLValue thatValue)
Description copied from interface: OCLValue
Return true if this is an equivalent OCL value to thatValue.

Note that the caller must check that the argument is an OCLValue and should also check for the shortcut case that this == thatValue. Implementations are therefore wasting time if they re-implement the shortcut.

Specified by:
oclEquals in interface OCLValue

oclHashCode

public int oclHashCode()
Specified by:
oclHashCode in interface OCLValue

toString

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