org.apache.hadoop.tools.rumen
Interface DeepCompare
- All Known Implementing Classes:
- LoggedDiscreteCDF, LoggedJob, LoggedLocation, LoggedNetworkTopology, LoggedSingleRelativeRanking, LoggedTask, LoggedTaskAttempt
public interface DeepCompare
Classes that implement this interface can deep-compare [for equality only,
not order] with another instance. They do a deep compare. If there is any
semantically significant difference, an implementer throws an Exception to be
thrown with a chain of causes describing the chain of field references and
indices that get you to the miscompared point.
deepCompare
void deepCompare(DeepCompare other,
TreePath myLocation)
throws DeepInequalityException
- Parameters:
other
- the other comparand that's being compared to memyLocation
- the path that got to me. In the root, myLocation is null. To
process the scalar foo
field of the root we will make a
recursive call with a TreePath
whose fieldName
is
"bar"
and whose index
is -1 and whose parent
is null
. To process the plural bar
field
of the root we will make a recursive call with a TreePath
whose fieldName is "foo"
and whose index
is -1 and
whose parent
is also null
.
- Throws:
DeepInequalityException
Copyright © 2009 The Apache Software Foundation