Package org.eclipse.emf.compare.utils
Enum Class UseIdentifiers
- All Implemented Interfaces:
Serializable
,Comparable<UseIdentifiers>
,java.lang.constant.Constable
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
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionNever use IDs, always use the content matching strategy.Only use id, do not fall back on content based matching if no id is found.Use ID when available on an element, if not available use the content matching strategy. -
Method Summary
Modifier and TypeMethodDescriptionstatic UseIdentifiers
Returns the enum constant of this class with the specified name.static UseIdentifiers[]
values()
Returns an array containing the constants of this enum class, 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 class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
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 nameNullPointerException
- if the argument is null
-