Class StateModelImpl

    • Field Detail

      • name

        protected String name
        Name of this model
      • version

        protected String version
        Version of this model
      • modelTagValues

        protected Map<String,​String> modelTagValues
        Model tagged values
    • Constructor Detail

      • StateModelImpl

        public StateModelImpl()
        Construteur
    • Method Detail

      • getModelType

        public String getModelType()
        Specified by:
        getModelType in interface Model
        Returns:
        the type of model.
      • getName

        public String getName()
        Description copied from interface: Model
        Returns the name of this model.
        Specified by:
        getName in interface Model
        Returns:
        the name of this model.
      • setName

        public void setName​(String name)
        Set model name.
        Parameters:
        name - model name
      • addStateChart

        public void addStateChart​(StateModelStateChart chart)
        Add chart.
        Parameters:
        chart - chart
      • addAllStateCharts

        public void addAllStateCharts​(Collection<StateModelStateChart> charts)
        Add a list of stateCharts into current model
        Parameters:
        charts - list
      • getTagValues

        public Map<String,​String> getTagValues()
        Description copied from interface: WithTagValuesOrStereotypes
        Returns the tagValues associated with this element. For each entry, the key is the name of the tagValue, the value is the value of the tagValue :-)
        Specified by:
        getTagValues in interface WithTagValuesOrStereotypes
        Returns:
        a Map containing all tagValues associated with this element
      • addTagValue

        public void addTagValue​(String key,
                                String value)
        Description copied from interface: WithTagValuesOrStereotypes
        Adds the given value associated to the tagValue. Note: If a previous tag value was definied, then it will be replaced.
        Specified by:
        addTagValue in interface WithTagValuesOrStereotypes
        Parameters:
        key - the name of the tag value
        value - the value to associate
      • getTagValue

        public String getTagValue​(String key)
        Description copied from interface: WithTagValuesOrStereotypes
        Returns the tagValue corresponding to the given name, or null if the element has no associated tagValue for this name.
        Specified by:
        getTagValue in interface WithTagValuesOrStereotypes
        Parameters:
        key - tag value key
        Returns:
        the value of the found tagValue, or null if the element has no associated tagValue for this name.
      • hasTagValue

        public boolean hasTagValue​(String tagValue)
        Description copied from interface: WithTagValuesOrStereotypes
        Returns whether this element has a tagValue corresponding to the given name, or not.
        Specified by:
        hasTagValue in interface WithTagValuesOrStereotypes
        Parameters:
        tagValue - tag value name
        Returns:
        a boolean indicating whether this element has a tagValue corresponding to the given name, or not.
      • setVersion

        public void setVersion​(String version)
        Set model version.
        Parameters:
        version - model version
      • getVersion

        public String getVersion()
        Description copied from interface: Model
        Returns the version of this model.
        Specified by:
        getVersion in interface Model
        Returns:
        the version of this model.
      • getExtension

        public <O> O getExtension​(String reference,
                                  Class<O> extensionClass)
                           throws RuntimeException
        Get the extension associated to the reference (unique). Create it if not exist.
        Specified by:
        getExtension in interface Model
        Type Parameters:
        O - object type returned
        Parameters:
        reference - unique corresponding to the extension to get
        extensionClass - class of the extension
        Returns:
        the object value for the extension
        Throws:
        ClassCastException - when extensionClass is not valid
        RuntimeException - when instantiation problem to create new extension