- All Implemented Interfaces:
Serializable,Comparable<DifferenceType>
The kind of difference.
In addition to the table there are some special cases:
What this means is different depending on what is being compared. In this Table then and now is used
to describe the object in the past and present:
SnapshotNode type |
REFERENCE |
EQUALITY |
TYPE_CHANGE |
KEY_ADDED |
KEY_REMOVED |
|---|---|---|---|---|---|
Any different sub classes of SnapshotNode |
Always | Always | Always | ||
ReferenceSnapshotNode |
|
|
|
never | never |
ArraySnapshotNode |
|
|
|
never | never |
ClassSnapshotNode |
|
|
|
never | never |
MapSnapshotNode |
|
|
|
|
|
null diffed against a non null value is always all three difference types. null diffed
against null is always none of the difference types.
- Author:
- Peter Lamby
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionThe value is different by equality (Object.equals(Object).A key was found in aMapthat was not there in the previous snapshot.A key that was previously in aMapis not there anymore.The value is different by reference (==).The class of the value changed. -
Method Summary
Modifier and TypeMethodDescriptionstatic DifferenceTypeReturns the enum constant of this type with the specified name.static DifferenceType[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
REFERENCE
The value is different by reference (==). -
EQUALITY
The value is different by equality (Object.equals(Object). -
TYPE_CHANGE
The class of the value changed. This always impliesREFERENCE. -
KEY_ADDED
-
KEY_REMOVED
-
-
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:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-