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

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
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
Direct Known Subclasses:
InvalidValueException, NullValueImpl

public abstract class UndefinedValueImpl
extends DomainException
implements NullValue

See Also:
Serialized Form
Generated
NOT

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
protected UndefinedValueImpl(java.lang.String message, java.lang.Throwable cause)
           
 
Method Summary
 NullValue abs()
           
 NullValue addInteger(IntegerValue right)
           
 NullValue addReal(RealValue right)
           
 OrderedCollectionValue append(java.lang.Object object)
           
 OrderedCollectionValue appendAll(OrderedCollectionValue objects)
           
 BagValue asBagValue()
           
 java.util.Collection<java.lang.Object> asCollection()
           
 CollectionValue asCollectionValue()
           
 java.lang.Double asDouble()
           
<T> java.util.List<T>
asEcoreObjects(IdResolver idResolver, java.lang.Class<T> elementClass)
           
 java.lang.Integer asInteger()
           
 IntegerValue asIntegerValue()
           
 java.util.List<java.lang.Object> asList()
           
 org.eclipse.emf.ecore.EObject asNavigableObject()
           
 java.lang.Number asNumber()
           
 java.lang.Object asObject()
           
 ObjectValue asObjectValue()
           
 OrderedCollectionValue asOrderedCollectionValue()
           
 OrderedSetValue asOrderedSetValue()
           
 RealValue asRealValue()
           
 SequenceValue asSequenceValue()
           
 SetValue asSetValue()
           
 TupleValue asTupleValue()
           
 UniqueCollectionValue asUniqueCollectionValue()
           
 Value asUnlimitedNaturalValue()
           
 Value at(int index)
           
 java.math.BigDecimal bigDecimalValue()
           
 java.math.BigInteger bigIntegerValue()
           
 RealValue commutatedAdd(RealValue left)
           
 IntegerValue commutatedDiv(IntegerValue left)
           
 RealValue commutatedDivide(RealValue left)
           
 IntegerValue commutatedMod(IntegerValue left)
           
 RealValue commutatedMultiply(RealValue left)
           
 RealValue commutatedSubtract(RealValue left)
           
 int compareTo(RealValue o)
           
 int compareToInteger(IntegerValue right)
           
 int compareToReal(RealValue right)
           
 int compareToUnlimited(UnlimitedValue right)
           
 IntegerValue count(java.lang.Object value)
           
 CollectionValue createNew()
           
 NullValue div(IntegerValue right)
           
 RealValue divideInteger(IntegerValue right)
           
 NullValue divideReal(RealValue right)
           
 NullValue divInteger(IntegerValue right)
           
 NullValue divUnlimited(UnlimitedValue right)
           
 double doubleValue()
           
 java.lang.Boolean excludes(java.lang.Object value)
           
 java.lang.Boolean excludesAll(CollectionValue c)
           
 CollectionValue excluding(java.lang.Object value)
           
 CollectionValue excludingAll(CollectionValue c)
           
 Value first()
           
 CollectionValue flatten()
           
 boolean flatten(java.util.Collection<java.lang.Object> flattenedElements)
           
 NullValue floor()
           
 DomainType getElement()
           
 java.util.List<? extends java.lang.Object> getElements()
           
 DomainType getInstanceType()
           
 java.lang.String getKind()
           
 java.lang.Object getObject()
           
abstract  OclVoidTypeId getTypeId()
          Return the type of this value determined from its construction context.
 java.lang.String getTypeName()
           
 java.lang.Object getValue(int index)
          Queries the value of the specified tuple part at 0-based index corresponding to the position of the required part-name in the alphabetically sorted list of all part-names.
 Value getValue(TuplePartId partId)
          Queries the value of the specified tuple part.
 java.lang.Boolean includes(java.lang.Object value)
           
 java.lang.Boolean includesAll(CollectionValue c)
           
 CollectionValue including(java.lang.Object value)
           
 CollectionValue includingAll(CollectionValue c)
           
 IntegerValue indexOf(java.lang.Object object)
           
 SequenceValue insertAt(int index, java.lang.Object object)
           
 CollectionValue intersection(CollectionValue c)
           
 int intSize()
           
 java.lang.Boolean isEmpty()
           
 boolean isFalse()
           
 IntegerValue isIntegerValue()
           
 boolean isOrdered()
           
 boolean isTrue()
           
 boolean isUndefined()
           
 boolean isUnique()
           
 boolean isUnlimited()
           
 boolean isUnlimitedNatural()
           
 java.lang.Iterable<? extends java.lang.Object> iterable()
           
 org.eclipse.ocl.examples.domain.values.impl.UndefinedValueImpl.Iterator iterator()
           
 Value last()
           
 NullValue max(RealValue right)
           
 NullValue maxInteger(IntegerValue right)
           
 NullValue maxReal(RealValue right)
           
 NullValue maxUnlimited(UnlimitedValue right)
           
 NullValue min(RealValue right)
           
 NullValue minInteger(IntegerValue right)
           
 NullValue minReal(RealValue right)
           
 NullValue minUnlimited(UnlimitedValue right)
           
 NullValue minus(UniqueCollectionValue set)
           
 NullValue modInteger(IntegerValue right)
           
 NullValue modUnlimited(UnlimitedValue right)
           
 NullValue multiplyInteger(IntegerValue right)
           
 NullValue multiplyReal(RealValue right)
           
 NullValue negate()
           
 java.lang.Boolean notEmpty()
           
 OrderedCollectionValue prepend(java.lang.Object object)
           
 OrderedCollectionValue prependAll(OrderedCollectionValue objects)
           
 java.util.Set<TupleValue> product(CollectionValue c, TupleTypeId tupleTypeId)
           
 OrderedCollectionValue reverse()
           
 NullValue round()
           
 int signum()
           
 IntegerValue size()
           
 SequenceValue sort(java.util.Comparator<java.lang.Object> comparator)
           
 java.lang.String stringValue()
           
 NullValue subOrderedSet(int lower, int upper)
           
 NullValue subSequence(int lower, int upper)
           
 NullValue subtractInteger(IntegerValue right)
           
 NullValue subtractReal(RealValue right)
           
 NullValue symmetricDifference(UniqueCollectionValue set)
           
protected  NullValue toInvalidValue()
           
 SequenceValue toSequenceValue()
           
 void toString(java.lang.StringBuilder s, int sizeLimit)
           
 CollectionValue union(CollectionValue c)
           
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.eclipse.ocl.examples.domain.values.IntegerValue
intValue
 
Methods inherited from interface org.eclipse.ocl.examples.domain.values.OCLValue
oclEquals, oclHashCode
 
Methods inherited from interface org.eclipse.ocl.examples.domain.values.CollectionValue
asEcoreObject, asEcoreObject
 
Methods inherited from interface org.eclipse.ocl.examples.domain.values.Value
asElement, isInvalid
 

Constructor Detail

UndefinedValueImpl

protected UndefinedValueImpl(@Nullable
                             java.lang.String message,
                             @Nullable
                             java.lang.Throwable cause)
Method Detail

abs

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

addInteger

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

addReal

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

append

@NonNull
public OrderedCollectionValue append(@Nullable
                                             java.lang.Object object)
Specified by:
append in interface OrderedCollectionValue

appendAll

@NonNull
public OrderedCollectionValue appendAll(@NonNull
                                                OrderedCollectionValue objects)
Specified by:
appendAll in interface OrderedCollectionValue

asBagValue

@NonNull
public BagValue asBagValue()
Specified by:
asBagValue in interface Value

asCollection

@NonNull
public java.util.Collection<java.lang.Object> asCollection()
Specified by:
asCollection in interface CollectionValue

asCollectionValue

@NonNull
public CollectionValue asCollectionValue()
Specified by:
asCollectionValue in interface Value

asDouble

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

asEcoreObjects

@NonNull
public <T> java.util.List<T> asEcoreObjects(@NonNull
                                                    IdResolver idResolver,
                                                    @NonNull
                                                    java.lang.Class<T> elementClass)
Specified by:
asEcoreObjects in interface CollectionValue

asInteger

@NonNull
public java.lang.Integer asInteger()
Specified by:
asInteger in interface Value

asIntegerValue

@NonNull
public IntegerValue asIntegerValue()
Specified by:
asIntegerValue in interface Value

asList

@NonNull
public java.util.List<java.lang.Object> asList()

asNavigableObject

@NonNull
public org.eclipse.emf.ecore.EObject asNavigableObject()
Specified by:
asNavigableObject 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

asObjectValue

@NonNull
public ObjectValue asObjectValue()
Specified by:
asObjectValue in interface Value

asOrderedCollectionValue

@NonNull
public OrderedCollectionValue asOrderedCollectionValue()
Specified by:
asOrderedCollectionValue in interface Value

asOrderedSetValue

@NonNull
public OrderedSetValue asOrderedSetValue()
Specified by:
asOrderedSetValue in interface Value

asRealValue

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

asSequenceValue

@NonNull
public SequenceValue asSequenceValue()
Specified by:
asSequenceValue in interface Value

asSetValue

@NonNull
public SetValue asSetValue()
Specified by:
asSetValue in interface Value

asTupleValue

@NonNull
public TupleValue asTupleValue()
Specified by:
asTupleValue in interface Value

asUniqueCollectionValue

@NonNull
public UniqueCollectionValue asUniqueCollectionValue()
Specified by:
asUniqueCollectionValue in interface Value

asUnlimitedNaturalValue

@NonNull
public Value asUnlimitedNaturalValue()
Specified by:
asUnlimitedNaturalValue in interface Value

at

@Nullable
public Value at(int index)
Specified by:
at in interface OrderedCollectionValue

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

commutatedDiv

@NonNull
public IntegerValue commutatedDiv(@NonNull
                                          IntegerValue left)
Specified by:
commutatedDiv in interface IntegerValue

commutatedDivide

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

commutatedMod

@NonNull
public IntegerValue commutatedMod(@NonNull
                                          IntegerValue left)
Specified by:
commutatedMod in interface IntegerValue

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 o)
Specified by:
compareTo in interface java.lang.Comparable<RealValue>

compareToInteger

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

compareToReal

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

compareToUnlimited

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

count

@NonNull
public IntegerValue count(@Nullable
                                  java.lang.Object value)
Specified by:
count in interface CollectionValue

createNew

@NonNull
public CollectionValue createNew()

div

@NonNull
public NullValue div(@NonNull
                             IntegerValue right)

divInteger

@NonNull
public NullValue divInteger(@NonNull
                                    IntegerValue right)
Specified by:
divInteger in interface IntegerValue

divUnlimited

@NonNull
public NullValue divUnlimited(@NonNull
                                      UnlimitedValue right)
Specified by:
divUnlimited in interface IntegerValue

divideInteger

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

divideReal

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

doubleValue

public double doubleValue()
Specified by:
doubleValue in interface RealValue

excludes

@NonNull
public java.lang.Boolean excludes(@Nullable
                                          java.lang.Object value)
Specified by:
excludes in interface CollectionValue

excludesAll

@NonNull
public java.lang.Boolean excludesAll(@NonNull
                                             CollectionValue c)
Specified by:
excludesAll in interface CollectionValue

excluding

@NonNull
public CollectionValue excluding(@Nullable
                                         java.lang.Object value)
Specified by:
excluding in interface CollectionValue

excludingAll

@NonNull
public CollectionValue excludingAll(@NonNull
                                            CollectionValue c)
Specified by:
excludingAll in interface CollectionValue

first

@Nullable
public Value first()
Specified by:
first in interface OrderedCollectionValue

flatten

@NonNull
public CollectionValue flatten()
Specified by:
flatten in interface CollectionValue

flatten

public boolean flatten(@NonNull
                       java.util.Collection<java.lang.Object> flattenedElements)
Specified by:
flatten in interface CollectionValue

floor

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

getElement

public DomainType getElement()

getElements

@NonNull
public java.util.List<? extends java.lang.Object> getElements()
Specified by:
getElements in interface CollectionValue

getInstanceType

@NonNull
public DomainType getInstanceType()

getKind

public java.lang.String getKind()
Specified by:
getKind in interface CollectionValue

getObject

public java.lang.Object getObject()
Specified by:
getObject in interface ObjectValue

getTypeId

@NonNull
public abstract 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
Returns:
its type

getTypeName

@NonNull
public java.lang.String getTypeName()

getValue

@NonNull
public Value getValue(@NonNull
                              TuplePartId partId)
Description copied from interface: TupleValue
Queries the value of the specified tuple part.

Specified by:
getValue in interface TupleValue
Parameters:
partId - the tuple part (as an attribute)
Returns:
the corresponding value

getValue

@NonNull
public java.lang.Object getValue(int index)
Description copied from interface: TupleValue
Queries the value of the specified tuple part at 0-based index corresponding to the position of the required part-name in the alphabetically sorted list of all part-names.

Specified by:
getValue in interface TupleValue

includes

@NonNull
public java.lang.Boolean includes(@Nullable
                                          java.lang.Object value)
Specified by:
includes in interface CollectionValue

includesAll

@NonNull
public java.lang.Boolean includesAll(@NonNull
                                             CollectionValue c)
Specified by:
includesAll in interface CollectionValue

including

@NonNull
public CollectionValue including(@Nullable
                                         java.lang.Object value)
Specified by:
including in interface CollectionValue

includingAll

@NonNull
public CollectionValue includingAll(@NonNull
                                            CollectionValue c)
Specified by:
includingAll in interface CollectionValue

indexOf

@NonNull
public IntegerValue indexOf(@Nullable
                                    java.lang.Object object)
Specified by:
indexOf in interface OrderedCollectionValue

insertAt

@NonNull
public SequenceValue insertAt(int index,
                                      @Nullable
                                      java.lang.Object object)
Specified by:
insertAt in interface OrderedCollectionValue

intSize

public int intSize()
Specified by:
intSize in interface CollectionValue

intersection

@NonNull
public CollectionValue intersection(@NonNull
                                            CollectionValue c)
Specified by:
intersection in interface CollectionValue

isEmpty

@NonNull
public java.lang.Boolean isEmpty()
Specified by:
isEmpty in interface CollectionValue

isFalse

public boolean isFalse()

isIntegerValue

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

isOrdered

public boolean isOrdered()
Specified by:
isOrdered in interface CollectionValue

isTrue

public boolean isTrue()

isUndefined

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

isUnique

public boolean isUnique()
Specified by:
isUnique in interface CollectionValue

isUnlimited

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

isUnlimitedNatural

public boolean isUnlimitedNatural()
Specified by:
isUnlimitedNatural in interface IntegerValue

iterable

@NonNull
public java.lang.Iterable<? extends java.lang.Object> iterable()
Specified by:
iterable in interface CollectionValue

iterator

@NonNull
public org.eclipse.ocl.examples.domain.values.impl.UndefinedValueImpl.Iterator iterator()
Specified by:
iterator in interface java.lang.Iterable<java.lang.Object>
Specified by:
iterator in interface CollectionValue

last

@Nullable
public Value last()
Specified by:
last in interface OrderedCollectionValue

max

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

maxInteger

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

maxReal

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

maxUnlimited

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

min

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

minInteger

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

minReal

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

minUnlimited

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

minus

@NonNull
public NullValue minus(@NonNull
                               UniqueCollectionValue set)
Specified by:
minus in interface UniqueCollectionValue

modInteger

@NonNull
public NullValue modInteger(@NonNull
                                    IntegerValue right)
Specified by:
modInteger in interface IntegerValue

modUnlimited

@NonNull
public NullValue modUnlimited(@NonNull
                                      UnlimitedValue right)
Specified by:
modUnlimited in interface IntegerValue

multiplyInteger

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

multiplyReal

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

negate

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

notEmpty

@NonNull
public java.lang.Boolean notEmpty()
Specified by:
notEmpty in interface CollectionValue

prepend

@NonNull
public OrderedCollectionValue prepend(@Nullable
                                              java.lang.Object object)
Specified by:
prepend in interface OrderedCollectionValue

prependAll

@NonNull
public OrderedCollectionValue prependAll(@NonNull
                                                 OrderedCollectionValue objects)
Specified by:
prependAll in interface OrderedCollectionValue

product

@Nullable
public java.util.Set<TupleValue> product(@NonNull
                                                  CollectionValue c,
                                                  @NonNull
                                                  TupleTypeId tupleTypeId)
Specified by:
product in interface CollectionValue

reverse

@NonNull
public OrderedCollectionValue reverse()
Specified by:
reverse in interface OrderedCollectionValue

round

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

signum

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

size

@NonNull
public IntegerValue size()
Specified by:
size in interface CollectionValue

sort

@NonNull
public SequenceValue sort(@NonNull
                                  java.util.Comparator<java.lang.Object> comparator)
Specified by:
sort in interface CollectionValue

stringValue

@NonNull
public java.lang.String stringValue()

subOrderedSet

@NonNull
public NullValue subOrderedSet(int lower,
                                       int upper)
Specified by:
subOrderedSet in interface OrderedSetValue

subSequence

@NonNull
public NullValue subSequence(int lower,
                                     int upper)
Specified by:
subSequence in interface SequenceValue

subtractInteger

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

subtractReal

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

symmetricDifference

@NonNull
public NullValue symmetricDifference(@NonNull
                                             UniqueCollectionValue set)
Specified by:
symmetricDifference in interface UniqueCollectionValue

toInvalidValue

@NonNull
protected NullValue toInvalidValue()

toSequenceValue

@NonNull
public SequenceValue toSequenceValue()
Specified by:
toSequenceValue in interface CollectionValue

toString

public void toString(@NonNull
                     java.lang.StringBuilder s,
                     int sizeLimit)
Specified by:
toString in interface Value

union

@NonNull
public CollectionValue union(@NonNull
                                     CollectionValue c)
Specified by:
union in interface CollectionValue