Enum Class CircularReferenceMatchingMode

java.lang.Object
java.lang.Enum<CircularReferenceMatchingMode>
de.danielbechler.diff.circular.CircularReferenceMatchingMode
All Implemented Interfaces:
Serializable, Comparable<CircularReferenceMatchingMode>, Constable

public enum CircularReferenceMatchingMode extends Enum<CircularReferenceMatchingMode>
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.
  • Enum Constant Details

  • Method Details

    • values

      public static CircularReferenceMatchingMode[] 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

      public static CircularReferenceMatchingMode valueOf(String name)
      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 name
      NullPointerException - if the argument is null