|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface DifferenceVisitor<T,A>
A visitor for visiting all types of differences.
All difference classes should implement a double-dispatch method as follows:
public <T, A> T accept(DifferenceVisitor<T, A> visitor, A argument) {
return visitor.visit(this, argument);
}
The visitor logic can the be invoked as follows:
difference.accept(new MyVisitor(), anOptionalArgument);
T determines the result type,
A determines the type of the optional argument
| Method Summary | |
|---|---|
T |
visit(ClassDifference classDifference,
A argument)
Visits a class difference. |
T |
visit(CollectionDifference collectionDifference,
A argument)
Visits a collection difference. |
T |
visit(Difference difference,
A argument)
Visits a simple difference. |
T |
visit(MapDifference mapDifference,
A argument)
Visits a map difference. |
T |
visit(ObjectDifference objectDifference,
A argument)
Visits an object difference. |
T |
visit(UnorderedCollectionDifference unorderedCollectionDifference,
A argument)
Visits an unordered collection difference. |
| Method Detail |
|---|
T visit(Difference difference,
A argument)
difference - The differenceargument - An optional argument, null if NA
T visit(ObjectDifference objectDifference,
A argument)
objectDifference - The differenceargument - An optional argument, null if NA
T visit(ClassDifference classDifference,
A argument)
classDifference - The differenceargument - An optional argument, null if NA
T visit(MapDifference mapDifference,
A argument)
mapDifference - The differenceargument - An optional argument, null if NA
T visit(CollectionDifference collectionDifference,
A argument)
collectionDifference - The differenceargument - An optional argument, null if NA
T visit(UnorderedCollectionDifference unorderedCollectionDifference,
A argument)
unorderedCollectionDifference - The differenceargument - An optional argument, null if NA
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||