org.eclipse.ocl.examples.pivot.values.impl
Class IntegerRangeValueImpl
java.lang.Object
org.eclipse.ocl.examples.pivot.values.impl.AbstractValue
org.eclipse.ocl.examples.pivot.values.impl.AbstractedCollectionValue
org.eclipse.ocl.examples.pivot.values.impl.AbstractCollectionValue<L>
org.eclipse.ocl.examples.pivot.values.impl.AbstractSequenceValue<org.eclipse.ocl.examples.pivot.values.impl.IntegerRangeImpl>
org.eclipse.ocl.examples.pivot.values.impl.IntegerRangeValueImpl
- All Implemented Interfaces:
- java.lang.Iterable<Value>, CollectionValue, NonUniqueCollectionValue, OrderedCollectionValue, SequenceValue, Value
public class IntegerRangeValueImpl
- extends AbstractSequenceValue<org.eclipse.ocl.examples.pivot.values.impl.IntegerRangeImpl>
Fields inherited from interface org.eclipse.ocl.examples.pivot.values.Value |
INVALID_NAME |
Methods inherited from class org.eclipse.ocl.examples.pivot.values.impl.AbstractSequenceValue |
asList, asOrderedCollectionValue, asSequenceValue, at, excluding, getKind, indexOf, insertAt, sort, subSequence, toOrderedCollectionValue |
Methods inherited from class org.eclipse.ocl.examples.pivot.values.impl.AbstractCollectionValue |
excludes, excludesAll, flatten, hashCode, includes, includesAll, intersection, intSize, iterator, maxMin, product, sum, union |
Methods inherited from class org.eclipse.ocl.examples.pivot.values.impl.AbstractedCollectionValue |
asBagValue, asCollection, asCollectionValue, asObject, asOrderedSetValue, asSetValue, asValidValue, isCollectionValue, isEmpty, notEmpty, size, toString |
Methods inherited from class org.eclipse.ocl.examples.pivot.values.impl.AbstractValue |
asBoolean, asBooleanValue, asDouble, asElement, asElementValue, asInteger, asIntegerValue, asObjectValue, asRealValue, asString, asStringValue, asTypeValue, asUniqueCollectionValue, getValueFactory, isFalse, isIntegerValue, isInvalid, isNull, isRealValue, isTrue, isUndefined, isUnlimited, isUnlimitedNatural, oclToString, toIntegerValue, toRealValue |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.eclipse.ocl.examples.pivot.values.CollectionValue |
asCollection, excludes, excludesAll, flatten, includes, includesAll, intersection, intSize, isEmpty, iterator, maxMin, notEmpty, product, size, sum, union |
Methods inherited from interface org.eclipse.ocl.examples.pivot.values.Value |
asBagValue, asBoolean, asBooleanValue, asCollectionValue, asDouble, asElement, asElementValue, asInteger, asIntegerValue, asObject, asObjectValue, asOrderedSetValue, asRealValue, asSetValue, asString, asStringValue, asTypeValue, asUniqueCollectionValue, asValidValue, getValueFactory, isCollectionValue, isFalse, isIntegerValue, isInvalid, isNull, isRealValue, isTrue, isUndefined, isUnlimited, isUnlimitedNatural, oclToString, toIntegerValue, toRealValue |
IntegerRangeValueImpl
public IntegerRangeValueImpl(ValueFactory valueFactory,
int first,
int last)
append
public SequenceValue append(Value value)
throws InvalidValueException
- Specified by:
append
in interface OrderedCollectionValue
- Overrides:
append
in class AbstractSequenceValue<org.eclipse.ocl.examples.pivot.values.impl.IntegerRangeImpl>
- Throws:
InvalidValueException
count
public IntegerValue count(Value value)
throws InvalidValueException
- Description copied from class:
AbstractCollectionValue
- Implementation of the OCL
Collection::count(object : T) : Integer
operation.
- Specified by:
count
in interface CollectionValue
- Overrides:
count
in class AbstractCollectionValue<org.eclipse.ocl.examples.pivot.values.impl.IntegerRangeImpl>
- Returns:
- the number of occurrences of the object in the collection
- Throws:
InvalidValueException
createElements
protected java.util.List<Value> createElements()
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in class AbstractSequenceValue<org.eclipse.ocl.examples.pivot.values.impl.IntegerRangeImpl>
first
public Value first()
- Specified by:
first
in interface OrderedCollectionValue
- Overrides:
first
in class AbstractSequenceValue<org.eclipse.ocl.examples.pivot.values.impl.IntegerRangeImpl>
flatten
public SequenceValue flatten()
- Specified by:
flatten
in interface CollectionValue
- Overrides:
flatten
in class AbstractSequenceValue<org.eclipse.ocl.examples.pivot.values.impl.IntegerRangeImpl>
getElements
public java.util.List<Value> getElements()
- Overrides:
getElements
in class AbstractCollectionValue<org.eclipse.ocl.examples.pivot.values.impl.IntegerRangeImpl>
getType
public Type getType(TypeManager typeManager,
Type staticType)
including
public SequenceValue including(Value value)
throws InvalidValueException
- Specified by:
including
in interface CollectionValue
- Overrides:
including
in class AbstractSequenceValue<org.eclipse.ocl.examples.pivot.values.impl.IntegerRangeImpl>
- Throws:
InvalidValueException
last
public Value last()
- Specified by:
last
in interface OrderedCollectionValue
- Overrides:
last
in class AbstractSequenceValue<org.eclipse.ocl.examples.pivot.values.impl.IntegerRangeImpl>
prepend
public SequenceValue prepend(Value value)
throws InvalidValueException
- Specified by:
prepend
in interface OrderedCollectionValue
- Overrides:
prepend
in class AbstractSequenceValue<org.eclipse.ocl.examples.pivot.values.impl.IntegerRangeImpl>
- Throws:
InvalidValueException
reverse
public SequenceValue reverse()
- Specified by:
reverse
in interface OrderedCollectionValue
- Overrides:
reverse
in class AbstractSequenceValue<org.eclipse.ocl.examples.pivot.values.impl.IntegerRangeImpl>
toString
public void toString(java.lang.StringBuffer s,
int lengthLimit)
- Specified by:
toString
in interface Value
- Overrides:
toString
in class AbstractSequenceValue<org.eclipse.ocl.examples.pivot.values.impl.IntegerRangeImpl>