Class Container
java.lang.Object
net.ssehub.easy.varModel.model.ModelElement
net.ssehub.easy.varModel.model.ContainableModelElement
net.ssehub.easy.varModel.model.datatypes.CustomDatatype
net.ssehub.easy.varModel.model.datatypes.StructuredDatatype
net.ssehub.easy.varModel.model.datatypes.Container
- All Implemented Interfaces:
IDatatype,IDatatypeVisitable,IModelElement
Realizes an abstract container.
- Author:
- heiko beck, Holger Eichelberger
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Operationstatic final Operationstatic final Operationstatic final Operationstatic final Operationstatic final Operationstatic final Operationstatic final Operation(package private) static final DelegatingTypestatic final Operationstatic final Operationstatic final Operationstatic final Operationstatic final Operationstatic final Operationstatic final Operationstatic final Operationstatic final Operationstatic final Operationstatic final Operationstatic final Operationstatic final Operationstatic final Operationstatic final Operationstatic final Operationstatic final Operationstatic final Operationstatic final Operationstatic final Operationstatic final Operationstatic final Operationstatic final Operationstatic final Operationstatic final Operationstatic final Operationprivate IDatatypestatic final IDatatypeThis constant represents the common type of all sets.static final Operationstatic final Operationstatic final Operationstatic final Operationstatic final Operation -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedContainer(String name, DelegatingType singleton, IDatatype type, IModelElement parent) Constructor for the container. -
Method Summary
Modifier and TypeMethodDescriptionvoidaccept(IDatatypeVisitor visitor) Accepts a specialized visitor for creating a textual representation of the identity of this type.voidaccept(IModelVisitor visitor) Accept method for the visitor.Returns the type of the contained elements.getGenericType(int index) Returns the specified generic type.intReturns the number of generic types.booleanisAssignableFrom(IDatatype type) Determines if the data type represented by this object is either the same as, or is a supertype oftype.static final booleanReturns whethertypeis a container with one generic of type Constraint.static final booleanisContainer(IDatatype type, IDatatype... generics) Returns whethertypeis a container and the givengenericsmatch.static final booleanReturns iftypeis a container of references.static booleanisReferencesContainer(IDatatype type, IDatatype elementType) Returns iftypeis a container of references of the givenelementType.Methods inherited from class net.ssehub.easy.varModel.model.datatypes.CustomDatatype
getOperation, getOperationCount, getType, getTypeClass, isPrimitive, isPseudoType, isTypeMethods inherited from class net.ssehub.easy.varModel.model.ContainableModelElement
getNameSpace, getParent, getProject, getQualifiedName, getTopLevelParent, isTopLevel, setParentMethods inherited from class net.ssehub.easy.varModel.model.ModelElement
findAttribute, getComment, getName, getUniqueName, isTransparent, propagateAttribute, setComment, setName, toStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface net.ssehub.easy.varModel.model.datatypes.IDatatype
getName, getNameSpace, getQualifiedName, getUniqueName
-
Field Details
-
DTYPE
-
TYPE
This constant represents the common type of all sets. Each specific sequence type is assignable to this type. -
SIZE
-
UNEQUALS
-
UNEQUALS_ALIAS
-
INCLUDES
-
EXCLUDES
-
INCLUDES_ALL
-
EXCLUDES_ALL
-
COUNT
-
IS_EMPTY
-
NOT_EMPTY
-
SUM
-
PRODUCT
-
MIN
-
MAX
-
AVG
-
TYPE_OF
-
ITERATE
-
APPLY
-
FORALL
-
EXISTS
-
ANY
-
ONE
-
IS_UNIQUE
-
COLLECT
-
COLLECT_NESTED
-
SORTED_BY
-
SELECT
-
REJECT
-
IS_ACYCLIC
-
CLOSURE
-
MIN2
-
MAX2
-
IS_DEFINED
-
IF_DEFINED
-
COPY
-
SELECT_BY_TYPE
-
TYPE_SELECT
-
SELECT_BY_KIND
-
TYPE_REJECT
-
type
-
-
Constructor Details
-
Container
Constructor for the container.- Parameters:
name- Name of the containersingleton- the instance which knows the operationstype- data type of the container elementsparent- the object, in which this specific one is embedded
-
-
Method Details
-
getContainedType
Returns the type of the contained elements.- Returns:
- the type of the contained elements
-
getGenericType
Description copied from interface:IDatatypeReturns the specified generic type.- Specified by:
getGenericTypein interfaceIDatatype- Overrides:
getGenericTypein classCustomDatatype- Parameters:
index- the index of the type- Returns:
- the specified generic type
-
getGenericTypeCount
public int getGenericTypeCount()Description copied from interface:IDatatypeReturns the number of generic types.- Specified by:
getGenericTypeCountin interfaceIDatatype- Overrides:
getGenericTypeCountin classCustomDatatype- Returns:
- the number of generic types
-
accept
Description copied from interface:IDatatypeVisitableAccepts a specialized visitor for creating a textual representation of the identity of this type.- Specified by:
acceptin interfaceIDatatypeVisitable- Overrides:
acceptin classContainableModelElement- Parameters:
visitor- the visitor to accept
-
accept
Description copied from interface:IModelElementAccept method for the visitor.- Parameters:
visitor- The visitor, which should process this model element.
-
isAssignableFrom
Determines if the data type represented by this object is either the same as, or is a supertype oftype.- Specified by:
isAssignableFromin interfaceIDatatype- Overrides:
isAssignableFromin classCustomDatatype- Parameters:
type- the type being checked- Returns:
trueif this type is either the same or a supertype oftype,trueelse
-
isConstraintContainer
Returns whethertypeis a container with one generic of type Constraint.- Parameters:
type- the type to check for- Returns:
trueiftypeis a container of Constraints,falseelse
-
isContainer
Returns whethertypeis a container and the givengenericsmatch.- Parameters:
type- the type to check forgenerics- the generics to be considered- Returns:
trueiftypeis a container with the given generics,falseelse- See Also:
-
isReferencesContainer
Returns iftypeis a container of references.- Parameters:
type- the type to check- Returns:
trueiftypeis a container of references,falseelse
-
isReferencesContainer
Returns iftypeis a container of references of the givenelementType.- Parameters:
type- the type to checkelementType- the element type within the references- Returns:
trueiftypeis a container of references,falseelse- See Also:
-