Class FragmentIdGenerator

  • All Implemented Interfaces:
    EMFIdGenerator

    public class FragmentIdGenerator
    extends java.lang.Object
    implements EMFIdGenerator
    An ID generator that uses the fragment as a unique identifier for an element. If this strategy is used, the fragment should be considered unique across all operations. For instance, if an element is removed within a list, all subsequent elements are moved ahead. If the index position is considered in the fragment, objects may be identified incorrectly.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getOrCreateId​(org.eclipse.emf.ecore.EObject element)
      Returns a unique identifier for the given element.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • FragmentIdGenerator

        public FragmentIdGenerator()
    • Method Detail

      • getOrCreateId

        public java.lang.String getOrCreateId​(org.eclipse.emf.ecore.EObject element)
        Description copied from interface: EMFIdGenerator
        Returns a unique identifier for the given element. The same element must always return the same id and should not conflict with other elements.
        Specified by:
        getOrCreateId in interface EMFIdGenerator
        Parameters:
        element - source element
        Returns:
        unique ID