Enum Class UseIdentifiers

java.lang.Object
java.lang.Enum<UseIdentifiers>
org.eclipse.emf.compare.utils.UseIdentifiers
All Implemented Interfaces:
Serializable, Comparable<UseIdentifiers>, java.lang.constant.Constable

public enum UseIdentifiers extends Enum<UseIdentifiers>
This can be used to tell EMF Compare which strategy should be used when matching the EObjects as regards the identifier.

  • ONLY tells EMF Compare to match elements through their ID only. Any element that does not have any identifier will remain unmatched.
  • WHEN_AVAILABLE tells EMF Compare to match elements through their IDs whenever possible, but fall back to a proximity algorithm for other elements.
  • NEVER tells EMF Compare to ignore identifiers altogether.

  • Enum Constant Details

    • ONLY

      public static final UseIdentifiers ONLY
      Only use id, do not fall back on content based matching if no id is found. This means any element not having an ID will not be matched.
    • WHEN_AVAILABLE

      public static final UseIdentifiers WHEN_AVAILABLE
      Use ID when available on an element, if not available use the content matching strategy.
    • NEVER

      public static final UseIdentifiers NEVER
      Never use IDs, always use the content matching strategy. That's useful for instance when you want to compare two results of a transformation which have arbitrary IDs.
  • Method Details

    • values

      public static UseIdentifiers[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static UseIdentifiers valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null