Class Container

    • Constructor Detail

      • Container

        protected Container​(java.lang.String name,
                            DelegatingType singleton,
                            IDatatype type,
                            IModelElement parent)
        Constructor for the container.
        Parameters:
        name - Name of the container
        singleton - the instance which knows the operations
        type - data type of the container elements
        parent - the object, in which this specific one is embedded
    • Method Detail

      • getContainedType

        public IDatatype getContainedType()
        Returns the type of the contained elements.
        Returns:
        the type of the contained elements
      • accept

        public void accept​(IModelVisitor visitor)
        Description copied from interface: IModelElement
        Accept method for the visitor.
        Parameters:
        visitor - The visitor, which should process this model element.
      • isAssignableFrom

        public boolean isAssignableFrom​(IDatatype type)
        Determines if the data type represented by this object is either the same as, or is a supertype of type.
        Specified by:
        isAssignableFrom in interface IDatatype
        Overrides:
        isAssignableFrom in class CustomDatatype
        Parameters:
        type - the type being checked
        Returns:
        true if this type is either the same or a supertype of type, true else
      • isConstraintContainer

        public static final boolean isConstraintContainer​(IDatatype type)
        Returns whether type is a container with one generic of type Constraint.
        Parameters:
        type - the type to check for
        Returns:
        true if type is a container of Constraints, false else
      • isReferencesContainer

        public static final boolean isReferencesContainer​(IDatatype type)
        Returns if type is a container of references.
        Parameters:
        type - the type to check
        Returns:
        true if type is a container of references, false else
      • isReferencesContainer

        public static boolean isReferencesContainer​(IDatatype type,
                                                    IDatatype elementType)
        Returns if type is a container of references of the given elementType.
        Parameters:
        type - the type to check
        elementType - the element type within the references
        Returns:
        true if type is a container of references, false else
        See Also:
        isContainer(IDatatype, IDatatype...)