org.eclipse.ocl.examples.pivot.values.impl
Class SetValueImpl
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<java.util.Set<Value>>
org.eclipse.ocl.examples.pivot.values.impl.SetValueImpl
- All Implemented Interfaces:
- java.lang.Iterable<Value>, CollectionValue, NonOrderedCollectionValue, SetValue, UniqueCollectionValue, Value
- Direct Known Subclasses:
- SetValueImpl.Accumulator
public class SetValueImpl
- extends AbstractCollectionValue<java.util.Set<Value>>
- implements SetValue
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 |
asBagValue, asCollection, asCollectionValue, asList, asObject, asOrderedSetValue, asSequenceValue, 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, 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 |
asBagValue, asBoolean, asBooleanValue, asCollectionValue, asDouble, asElement, asElementValue, asInteger, asIntegerValue, asObject, asObjectValue, asOrderedCollectionValue, asOrderedSetValue, asRealValue, asSequenceValue, asString, asStringValue, asTypeValue, asValidValue, getValueFactory, isCollectionValue, isFalse, isIntegerValue, isInvalid, isNull, isRealValue, isTrue, isUndefined, isUnlimited, isUnlimitedNatural, oclToString, toIntegerValue, toRealValue |
SetValueImpl
public SetValueImpl(ValueFactory valueFactory,
Value... elements)
SetValueImpl
public SetValueImpl(ValueFactory valueFactory,
java.util.Collection<? extends Value> elements)
SetValueImpl
public SetValueImpl(ValueFactory valueFactory,
java.util.Set<Value> elements)
intersection
public static SetValue intersection(ValueFactory valueFactory,
CollectionValue left,
CollectionValue right)
throws InvalidValueException
- Throws:
InvalidValueException
union
public static SetValue union(ValueFactory valueFactory,
CollectionValue left,
CollectionValue right)
throws InvalidValueException
- Throws:
InvalidValueException
valueOfElements
public static SetValue valueOfElements(ValueFactory valueFactory,
java.util.Collection<? extends Element> elements)
valueOfObjects
public static SetValue valueOfObjects(ValueFactory valueFactory,
java.util.Collection<? extends java.lang.Object> objects)
asUniqueCollectionValue
public UniqueCollectionValue asUniqueCollectionValue()
- Specified by:
asUniqueCollectionValue
in interface Value
- Overrides:
asUniqueCollectionValue
in class AbstractValue
asSetValue
public SetValue asSetValue()
- Specified by:
asSetValue
in interface Value
- Overrides:
asSetValue
in class AbstractedCollectionValue
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in class java.lang.Object
excluding
public SetValue excluding(Value value)
- Specified by:
excluding
in interface CollectionValue
flatten
public SetValue 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 SetValue including(Value value)
throws InvalidValueException
- Specified by:
including
in interface CollectionValue
- Throws:
InvalidValueException
minus
public SetValue minus(UniqueCollectionValue set)
throws InvalidValueException
- Specified by:
minus
in interface UniqueCollectionValue
- Throws:
InvalidValueException
sort
public OrderedSetValue sort(java.util.Comparator<Value> comparator)
- Specified by:
sort
in interface CollectionValue
symmetricDifference
public SetValue symmetricDifference(UniqueCollectionValue set)
- Specified by:
symmetricDifference
in interface UniqueCollectionValue
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