Package de.danielbechler.diff.circular
Enum Class CircularReferenceMatchingMode
java.lang.Object
java.lang.Enum<CircularReferenceMatchingMode>
de.danielbechler.diff.circular.CircularReferenceMatchingMode
- All Implemented Interfaces:
Serializable,Comparable<CircularReferenceMatchingMode>,Constable
Defines how the
CircularReferenceDetector compares object instances. The
default is EQUALITY_OPERATOR and this should be sufficient in mose
cases. However, you may be dealing with an object model that returns copies of its properties, instead of
reusing the exact same instance. In this cases it would be easy to end up in infinite loops, as the default
circular reference detection would not be able to detect this. In those cases you should switch to the
EQUALS_METHOD mode. The trade-off is, that this renders you unable to nest equal but different
objects.-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionCompares objects using the==operator.Compares objects using Object.equals(Object). -
Method Summary
Modifier and TypeMethodDescriptionReturns the enum constant of this class with the specified name.static CircularReferenceMatchingMode[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
EQUALITY_OPERATOR
Compares objects using the==operator. -
EQUALS_METHOD
Compares objects using Object.equals(Object).
-
-
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
-