public class CollectionLiteralExpOperations extends OCLExpressionOperations
The following operations are supported:
Check No Collection Instances
Check Set Kind
Check Sequence Kind
Check Bag Kind
Check Element Type
Modifier and Type | Method and Description |
---|---|
static <C> boolean |
checkBagKind(CollectionLiteralExp<C> collectionLiteralExp,
DiagnosticChain diagnostics,
Map<Object,Object> context)
kind = CollectionKind::Bag implies type.oclIsKindOf(BagType)
|
static <C> boolean |
checkElementType(CollectionLiteralExp<C> collectionLiteralExp,
DiagnosticChain diagnostics,
Map<Object,Object> context)
type.oclAsType(CollectionType).elementType = part->iterate(p; c : Classifier = OclVoid | c.commonSuperType(p.type))
|
static <C> boolean |
checkNoCollectionInstances(CollectionLiteralExp<C> collectionLiteralExp,
DiagnosticChain diagnostics,
Map<Object,Object> context)
kind <> CollectionKind::Collection
|
static <C> boolean |
checkSequenceKind(CollectionLiteralExp<C> collectionLiteralExp,
DiagnosticChain diagnostics,
Map<Object,Object> context)
kind = CollectionKind::Sequence implies type.oclIsKindOf(SequenceType)
|
static <C> boolean |
checkSetKind(CollectionLiteralExp<C> collectionLiteralExp,
DiagnosticChain diagnostics,
Map<Object,Object> context)
kind = CollectionKind::Set implies type.oclIsKindOf(SetType)
|
public static <C> boolean checkNoCollectionInstances(CollectionLiteralExp<C> collectionLiteralExp, DiagnosticChain diagnostics, Map<Object,Object> context)
collectionLiteralExp
- The receiving 'Collection Literal Exp' model object.diagnostics
- The chain of diagnostics to which problems are to be appended.context
- The cache of context-specific information.
public static <C> boolean checkSetKind(CollectionLiteralExp<C> collectionLiteralExp, DiagnosticChain diagnostics, Map<Object,Object> context)
collectionLiteralExp
- The receiving 'Collection Literal Exp' model object.diagnostics
- The chain of diagnostics to which problems are to be appended.context
- The cache of context-specific information.
public static <C> boolean checkSequenceKind(CollectionLiteralExp<C> collectionLiteralExp, DiagnosticChain diagnostics, Map<Object,Object> context)
collectionLiteralExp
- The receiving 'Collection Literal Exp' model object.diagnostics
- The chain of diagnostics to which problems are to be appended.context
- The cache of context-specific information.
public static <C> boolean checkBagKind(CollectionLiteralExp<C> collectionLiteralExp, DiagnosticChain diagnostics, Map<Object,Object> context)
collectionLiteralExp
- The receiving 'Collection Literal Exp' model object.diagnostics
- The chain of diagnostics to which problems are to be appended.context
- The cache of context-specific information.
public static <C> boolean checkElementType(CollectionLiteralExp<C> collectionLiteralExp, DiagnosticChain diagnostics, Map<Object,Object> context)
collectionLiteralExp
- The receiving 'Collection Literal Exp' model object.diagnostics
- The chain of diagnostics to which problems are to be appended.context
- The cache of context-specific information.
Copyright © 2005, 2018 IBM Corporation and others. All Rights Reserved.