- Alle Superschnittstellen:
Iterable<DifferenceNode>
- Alle bekannten Implementierungsklassen:
DifferenceNode.EmptyDifferenceNode,DifferenceNodes,LeafDifferenceNode,MapDifferenceNode
- Autor:
- Peter Lamby
-
Verschachtelte Klassen - Übersicht
Verschachtelte KlassenModifizierer und TypSchnittstelleBeschreibungstatic classA Difference that is always empty. -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungdefault DifferenceNodeGets a differenceNode specified by an expression.default DifferenceNodeGets a direct child node in the object tree.@Nullable DifferenceNodegetChildNullable(String name) Gets a direct child node in the object tree.getName()The relative path inside the object tree.getTypes()Describes in what way the current node changed.default Set<DifferenceType>All theDifferenceTypein the hierarchy.default booleanisDifferent(DifferenceType @Nullable ... types) Did the node change in one of the ways described by types.default booleanisDifferent(String path, DifferenceType @Nullable ... types) Convenience method fordifferenceNode.getChild("myPath").isDifferent(types...);default booleanisDifferentRecursive(DifferenceType @Nullable ... types) Did the current node or one of its children change?<T> Tvisit(de.serra.so_dirty.difference.visit.DifferenceVisitor<T> visitor, DifferenceVisit<T> visit) Visits the current node.Von Schnittstelle geerbte Methoden java.lang.Iterable
forEach, iterator, spliterator
-
Methodendetails
-
visit
<T> T visit(de.serra.so_dirty.difference.visit.DifferenceVisitor<T> visitor, DifferenceVisit<T> visit) Visits the current node.The children will be visited after
thisnode has been visited.The visiting of children can be prevented by calling
DifferenceVisit.dontGoDeeper()usually from thevisitor.- Typparameter:
T- The return type of the visit.- Parameter:
visitor- The visitor.visit- The visit.- Gibt zurück:
- The
DifferenceVisit.value().
-
getName
String getName()The relative path inside the object tree.- Gibt zurück:
- The path.
-
getTypes
Set<DifferenceType> getTypes()Describes in what way the current node changed. Returns an empty set if there are no changes.- Gibt zurück:
- The types of change if any.
-
getTypesRecursive
All theDifferenceTypein the hierarchy.- Gibt zurück:
- all the
DifferenceTypein the hierarchy.
-
get
Gets a differenceNode specified by an expression.There is no specification for the expression language right now. Please take a look at the PathUtilTest to see how to use it.
- Parameter:
path- The path expression.- Gibt zurück:
- The difference node at the specified path.
-
getChildNullable
Gets a direct child node in the object tree.Will return
nullif the child does not exist.- Parameter:
name- The name of the child node.- Gibt zurück:
- The result of the desired node. May return
null.
-
getChild
Gets a direct child node in the object tree.Will always successfully return even if the node does not exist. In that case an empty result is returned.
- Parameter:
childName- The name of the child node.- Gibt zurück:
- The result of the desired node. Will return a result with no changes if the node does not exist.
-
isDifferent
Did the node change in one of the ways described by types.This method will only report a difference if it's one of the
types. Iftypesisnullthis methods checks for any difference. Iftypes.length == 0this method will always return false.- Parameter:
types- The types of difference to check for.- Gibt zurück:
trueif there is a difference described bytypesfalseotherwise.
-
isDifferent
Convenience method fordifferenceNode.getChild("myPath").isDifferent(types...);- Parameter:
path- The relative path of the desired node to be checked.types- The types of difference to check for.- Gibt zurück:
trueif there is a difference described bytypesfalseotherwise.
-
isDifferentRecursive
Did the current node or one of its children change?This method will only report a difference if it's one of the
types. Iftypesisnullthis methods checks for any difference. Iftypes.length == 0this method will always return false.- Parameter:
types- The types of difference to check for.- Gibt zurück:
trueif the current node or its children changed.falseotherwise.
-