public class HollowFieldDiff extends java.lang.Object implements java.lang.Comparable<HollowFieldDiff>
HollowTypeDiff
, this is a report of the differences in a specific field between two data states.Constructor and Description |
---|
HollowFieldDiff(HollowDiffNodeIdentifier fieldIdentifier) |
Modifier and Type | Method and Description |
---|---|
void |
addDiff(int fromOrdinal,
int toOrdinal,
int score)
Should be called exclusively from the
HollowDiff -- not intended for external consumption |
void |
addResults(HollowFieldDiff otherFieldDiff)
This should be called exclusively from the
HollowDiff . |
int |
compareTo(HollowFieldDiff o)
Comparison is based on the totalDiffScore().
|
HollowDiffNodeIdentifier |
getFieldIdentifier() |
int |
getFromOrdinal(int diffPairIdx) |
int |
getNumDiffs() |
int |
getPairScore(int diffPairIdx) |
int |
getToOrdinal(int diffPairIdx) |
long |
getTotalDiffScore() |
public HollowFieldDiff(HollowDiffNodeIdentifier fieldIdentifier)
public void addDiff(int fromOrdinal, int toOrdinal, int score)
HollowDiff
-- not intended for external consumptionpublic HollowDiffNodeIdentifier getFieldIdentifier()
public long getTotalDiffScore()
public int getNumDiffs()
public int getFromOrdinal(int diffPairIdx)
diffPairIdx
- a number from 0-n, where n is the value returned from numDiffspublic int getToOrdinal(int diffPairIdx)
diffPairIdx
- a number from 0-n, where n is the value returned from numDiffspublic int getPairScore(int diffPairIdx)
diffPairIdx
- a number from 0-n, where n is the value returned from numDiffspublic void addResults(HollowFieldDiff otherFieldDiff)
HollowDiff
. Not for external consumption.public int compareTo(HollowFieldDiff o)
compareTo
in interface java.lang.Comparable<HollowFieldDiff>