Enum UseIdentifiers

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

public enum UseIdentifiers
extends java.lang.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.

  • Nested Class Summary

    Nested classes/interfaces inherited from class java.lang.Enum

    java.lang.Enum.EnumDesc<E extends java.lang.Enum<E>>
  • Enum Constant Summary

    Enum Constants 
    Enum Constant Description
    NEVER
    Never use IDs, always use the content matching strategy.
    ONLY
    Only use id, do not fall back on content based matching if no id is found.
    WHEN_AVAILABLE
    Use ID when available on an element, if not available use the content matching strategy.
  • Method Summary

    Modifier and Type Method Description
    static UseIdentifiers valueOf​(java.lang.String name)
    Returns the enum constant of this type with the specified name.
    static UseIdentifiers[] values()
    Returns an array containing the constants of this enum type, in the order they are declared.

    Methods inherited from class java.lang.Enum

    clone, compareTo, describeConstable, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, wait, wait, wait
  • 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 type, in the order they are declared.
      Returns:
      an array containing the constants of this enum type, in the order they are declared
    • valueOf

      public static UseIdentifiers valueOf​(java.lang.String name)
      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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:
      java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
      java.lang.NullPointerException - if the argument is null