Package org.eclipse.emf.compare.utils
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
-
Enum Constant Summary
Enum Constants Enum Constant Description NEVERNever use IDs, always use the content matching strategy.ONLYOnly use id, do not fall back on content based matching if no id is found.WHEN_AVAILABLEUse ID when available on an element, if not available use the content matching strategy. -
Method Summary
Modifier and Type Method Description static UseIdentifiersvalueOf(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.
-
Enum Constant Details
-
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
Use ID when available on an element, if not available use the content matching strategy. -
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
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
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 namejava.lang.NullPointerException- if the argument is null
-