org.eclipse.ocl.examples.pivot.values.impl
Class BagValueImpl
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<Bag<Value>>
org.eclipse.ocl.examples.pivot.values.impl.BagValueImpl
- All Implemented Interfaces:
- java.lang.Iterable<Value>, BagValue, CollectionValue, NonOrderedCollectionValue, NonUniqueCollectionValue, Value
- Direct Known Subclasses:
- BagValueImpl.Accumulator
public class BagValueImpl
- extends AbstractCollectionValue<Bag<Value>>
- implements BagValue
Fields inherited from interface org.eclipse.ocl.examples.pivot.values.Value |
INVALID_NAME |
Methods inherited from class org.eclipse.ocl.examples.pivot.values.impl.AbstractCollectionValue |
count, excludes, excludesAll, flatten, getElements, hashCode, includes, includesAll, intersection, intSize, iterator, maxMin, product, sum, union |
Methods inherited from class org.eclipse.ocl.examples.pivot.values.impl.AbstractedCollectionValue |
asCollection, asCollectionValue, asList, asObject, asOrderedSetValue, asSequenceValue, 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, asOrderedCollectionValue, 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, asList, count, 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 |
asBoolean, asBooleanValue, asCollectionValue, asDouble, asElement, asElementValue, asInteger, asIntegerValue, asObject, asObjectValue, asOrderedCollectionValue, asOrderedSetValue, asRealValue, asSequenceValue, asSetValue, asString, asStringValue, asTypeValue, asUniqueCollectionValue, asValidValue, getValueFactory, isCollectionValue, isFalse, isIntegerValue, isInvalid, isNull, isRealValue, isTrue, isUndefined, isUnlimited, isUnlimitedNatural, oclToString, toIntegerValue, toRealValue |
BagValueImpl
public BagValueImpl(ValueFactory valueFactory,
Value... elements)
BagValueImpl
public BagValueImpl(ValueFactory valueFactory,
java.util.Collection<? extends Value> elements)
BagValueImpl
public BagValueImpl(ValueFactory valueFactory,
Bag<Value> elements)
intersection
public static BagValue intersection(ValueFactory valueFactory,
CollectionValue left,
CollectionValue right)
throws InvalidValueException
- Throws:
InvalidValueException
union
public static BagValue union(ValueFactory valueFactory,
CollectionValue left,
CollectionValue right)
throws InvalidValueException
- Throws:
InvalidValueException
asBagValue
public BagValue asBagValue()
- Specified by:
asBagValue
in interface Value
- Overrides:
asBagValue
in class AbstractedCollectionValue
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in class java.lang.Object
excluding
public BagValue excluding(Value value)
- Specified by:
excluding
in interface CollectionValue
flatten
public BagValue flatten()
throws InvalidValueException
- Specified by:
flatten
in interface CollectionValue
- Throws:
InvalidValueException
getKind
public CollectionKind getKind()
- Specified by:
getKind
in interface CollectionValue
getType
public Type getType(TypeManager typeManager,
Type staticType)
- Specified by:
getType
in interface Value
including
public BagValue including(Value value)
throws InvalidValueException
- Specified by:
including
in interface CollectionValue
- Throws:
InvalidValueException
sort
public SequenceValue sort(java.util.Comparator<Value> comparator)
- Specified by:
sort
in interface CollectionValue
toOrderedCollectionValue
public OrderedCollectionValue toOrderedCollectionValue()
- Specified by:
toOrderedCollectionValue
in interface CollectionValue
toString
public void toString(java.lang.StringBuffer s,
int lengthLimit)
- Specified by:
toString
in interface Value
- Overrides:
toString
in class AbstractedCollectionValue