org.eclipse.ocl.examples.pivot.values.impl
Class AbstractValue

java.lang.Object
  extended by org.eclipse.ocl.examples.pivot.values.impl.AbstractValue
All Implemented Interfaces:
Value
Direct Known Subclasses:
AbstractedCollectionValue, AbstractUndefinedValue, BooleanValueImpl, IntegerValueImpl, ObjectValueImpl, RealValueImpl, SortedByIteration.SortingValue, StringValueImpl, TupleValueImpl, UnlimitedValueImpl

public abstract class AbstractValue
extends java.lang.Object
implements Value


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.eclipse.ocl.examples.pivot.values.Value
Value.BinaryOperation
 
Field Summary
protected  ValueFactory valueFactory
           
 
Fields inherited from interface org.eclipse.ocl.examples.pivot.values.Value
INVALID_NAME
 
Constructor Summary
protected AbstractValue(ValueFactory valueFactory)
           
 
Method Summary
 BagValue asBagValue()
           
 boolean asBoolean()
           
 BooleanValue asBooleanValue()
           
 CollectionValue asCollectionValue()
           
 java.lang.Double asDouble()
           
 Element asElement()
           
 ElementValue<?> asElementValue()
           
 java.lang.Integer asInteger()
           
 IntegerValue asIntegerValue()
           
 ObjectValue asObjectValue()
           
 OrderedCollectionValue asOrderedCollectionValue()
           
 OrderedSetValue asOrderedSetValue()
           
 RealValue asRealValue()
           
 SequenceValue asSequenceValue()
           
 SetValue asSetValue()
           
 java.lang.String asString()
           
 StringValue asStringValue()
           
 TypeValue asTypeValue()
           
 UniqueCollectionValue asUniqueCollectionValue()
           
 ValueFactory getValueFactory()
           
 CollectionValue isCollectionValue()
           
 boolean isFalse()
           
 IntegerValue isIntegerValue()
           
 boolean isInvalid()
           
 boolean isNull()
           
 RealValue isRealValue()
           
 boolean isTrue()
           
 boolean isUndefined()
           
 boolean isUnlimited()
           
 boolean isUnlimitedNatural()
           
 java.lang.String oclToString()
           
 IntegerValue toIntegerValue()
           
 RealValue toRealValue()
           
 void toString(java.lang.StringBuffer s, int sizeLimit)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.eclipse.ocl.examples.pivot.values.Value
asObject, asValidValue, getType
 

Field Detail

valueFactory

protected final ValueFactory valueFactory
Constructor Detail

AbstractValue

protected AbstractValue(ValueFactory valueFactory)
Method Detail

asBagValue

public BagValue asBagValue()
                    throws InvalidValueException
Specified by:
asBagValue in interface Value
Throws:
InvalidValueException

asBoolean

public boolean asBoolean()
                  throws InvalidValueException
Specified by:
asBoolean in interface Value
Throws:
InvalidValueException

asBooleanValue

public BooleanValue asBooleanValue()
                            throws InvalidValueException
Specified by:
asBooleanValue in interface Value
Throws:
InvalidValueException

asCollectionValue

public CollectionValue asCollectionValue()
                                  throws InvalidValueException
Specified by:
asCollectionValue in interface Value
Throws:
InvalidValueException

asDouble

public java.lang.Double asDouble()
                          throws InvalidValueException
Specified by:
asDouble in interface Value
Throws:
InvalidValueException

asElement

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

asElementValue

public ElementValue<?> asElementValue()
                               throws InvalidValueException
Specified by:
asElementValue in interface Value
Throws:
InvalidValueException

asInteger

public java.lang.Integer asInteger()
                            throws InvalidValueException
Specified by:
asInteger in interface Value
Throws:
InvalidValueException

asIntegerValue

public IntegerValue asIntegerValue()
                            throws InvalidValueException
Specified by:
asIntegerValue in interface Value
Throws:
InvalidValueException

asObjectValue

public ObjectValue asObjectValue()
                          throws InvalidValueException
Specified by:
asObjectValue in interface Value
Throws:
InvalidValueException

asOrderedCollectionValue

public OrderedCollectionValue asOrderedCollectionValue()
                                                throws InvalidValueException
Specified by:
asOrderedCollectionValue in interface Value
Throws:
InvalidValueException

asOrderedSetValue

public OrderedSetValue asOrderedSetValue()
                                  throws InvalidValueException
Specified by:
asOrderedSetValue in interface Value
Throws:
InvalidValueException

asRealValue

public RealValue asRealValue()
                      throws InvalidValueException
Specified by:
asRealValue in interface Value
Throws:
InvalidValueException

asSequenceValue

public SequenceValue asSequenceValue()
                              throws InvalidValueException
Specified by:
asSequenceValue in interface Value
Throws:
InvalidValueException

asSetValue

public SetValue asSetValue()
                    throws InvalidValueException
Specified by:
asSetValue in interface Value
Throws:
InvalidValueException

asString

public java.lang.String asString()
                          throws InvalidValueException
Specified by:
asString in interface Value
Throws:
InvalidValueException

asStringValue

public StringValue asStringValue()
                          throws InvalidValueException
Specified by:
asStringValue in interface Value
Throws:
InvalidValueException

asTypeValue

public TypeValue asTypeValue()
                      throws InvalidValueException
Specified by:
asTypeValue in interface Value
Throws:
InvalidValueException

asUniqueCollectionValue

public UniqueCollectionValue asUniqueCollectionValue()
                                              throws InvalidValueException
Specified by:
asUniqueCollectionValue in interface Value
Throws:
InvalidValueException

getValueFactory

public ValueFactory getValueFactory()
Specified by:
getValueFactory in interface Value

isCollectionValue

public CollectionValue isCollectionValue()
Specified by:
isCollectionValue in interface Value

isFalse

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

isIntegerValue

public IntegerValue isIntegerValue()
Specified by:
isIntegerValue in interface Value

isInvalid

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

isNull

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

isRealValue

public RealValue isRealValue()
Specified by:
isRealValue in interface Value

isTrue

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

isUndefined

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

isUnlimited

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

isUnlimitedNatural

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

oclToString

public java.lang.String oclToString()
Specified by:
oclToString in interface Value

toIntegerValue

public IntegerValue toIntegerValue()
                            throws InvalidValueException
Specified by:
toIntegerValue in interface Value
Throws:
InvalidValueException

toRealValue

public RealValue toRealValue()
                      throws InvalidValueException
Specified by:
toRealValue in interface Value
Throws:
InvalidValueException

toString

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