Class BmMap<K,V>

Type Parameters:
K - the type of the map keys
V - the type of the map values
All Implemented Interfaces:
IAttribute<IBmObject,org.eclipse.emf.ecore.EStructuralFeature>, IEditableModel, IEmfAttribute<IBmObject>, IModel, IEmfMapAttribute<K,V,IBmObject>, IMap<K,V>, IValidable, IModelApiAwareModel, Map<K,V>
Direct Known Subclasses:
BmMultilanguageModel

public class BmMap<K,V> extends MapModel<K,V> implements IEmfMapAttribute<K,V,IBmObject>, IModelApiAwareModel
Represents a BM object feature map model.
See Also:
  • Constructor Details

    • BmMap

      public BmMap(org.eclipse.emf.ecore.EObject object, org.eclipse.emf.ecore.EStructuralFeature feature)
      Instantiates a new BM map.
      Parameters:
      object - the object.
      feature - the object feature.
  • Method Details

    • getChange

      public IChange getChange()
      Specified by:
      getChange in interface IModel
      Returns:
      change describing the modifications done to the model.
    • dispose

      public void dispose()
      Description copied from interface: IModel
      Disposes this model.
      Specified by:
      dispose in interface IModel
      Overrides:
      dispose in class Model
    • getObject

      public IBmObject getObject()
      Description copied from interface: IAttribute
      Returns the object that keeps the attribute.
      Specified by:
      getObject in interface IAttribute<K,V>
      Returns:
      the object that keeps the attribute.
    • getProperty

      public org.eclipse.emf.ecore.EStructuralFeature getProperty()
      Description copied from interface: IAttribute
      Returns the property.
      Specified by:
      getProperty in interface IAttribute<K,V>
      Returns:
      the property.
    • setModelApi

      public void setModelApi(IModelApi modelApi)
      Description copied from interface: IModelApiAwareModel
      Sets the specified API to the model.
      Specified by:
      setModelApi in interface IModelApiAwareModel
      Parameters:
      modelApi - the API, can be null.
    • getModelApi

      public IModelApi getModelApi()
      Description copied from interface: IModelApiAwareModel
      Returns the model API.
      Specified by:
      getModelApi in interface IModelApiAwareModel
      Returns:
      the model API or null if it is not set.
    • createTask

      protected IModelApiTaskN<Void> createTask(IBmObject object, org.eclipse.emf.ecore.EStructuralFeature feature, Map<K,V> valueToApply)
      Creates an IModelApiTaskN that executes during applying changes.
      Parameters:
      object - the object to change, cannot be null.
      feature - the feature the feature to change, cannot be null.
      valueToApply - the value to apply.
      Returns:
      the created IModelApiTaskN.
    • setObjectValue

      protected void setObjectValue(org.eclipse.emf.ecore.EObject object, org.eclipse.emf.ecore.EStructuralFeature feature, Map<K,V> newValue)
      Sets the new value of the provided model object feature during the commit.
      The method is invoked within the task, so the given objects have the relevant state (e.g. attached to transaction).
      Parameters:
      object - the object to set new value, cannot be null.
      feature - the feture to set, cannot be null.
      newValue - the new value to set, can be null.