Enum UseIdentifiers

  • All Implemented Interfaces:
    Serializable, Comparable<UseIdentifiers>

    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 Detail

      • 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 Detail

      • values

        public static UseIdentifiers[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (UseIdentifiers c : UseIdentifiers.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static UseIdentifiers valueOf​(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:
        IllegalArgumentException - if this enum type has no constant with the specified name
        NullPointerException - if the argument is null