Class HintReviewPairs
- java.lang.Object
-
- com.tibco.patterns.learn.api.hint.HintReviewPairs
-
- All Implemented Interfaces:
Hint
- Direct Known Subclasses:
HintReviewContra,HintReviewMislabeled
public abstract class HintReviewPairs extends java.lang.Object implements Hint
A hint to review the labels for a list of existing record pairs.
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedHintReviewPairs(java.util.Map<RecPairId,java.lang.Double> recPairs)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Set<RecPairId>getRecPairs()doublegetScoreDist(RecPairId recPairId)Get the computed score distance for a record pair.intsize()java.lang.StringtoString()
-
-
-
Field Detail
-
recPairs
protected final java.util.Map<RecPairId,java.lang.Double> recPairs
-
-
Constructor Detail
-
HintReviewPairs
protected HintReviewPairs(java.util.Map<RecPairId,java.lang.Double> recPairs)
- Parameters:
recPairs- - the pairs to be included in the hint.- Throws:
java.lang.IllegalArgumentException- if no record pairs are provided, or if the map contains null values.
-
-
Method Detail
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
getRecPairs
public java.util.Set<RecPairId> getRecPairs()
- Returns:
- unmodifiable set that contains IDs of all record pairs for this hint.
-
getScoreDist
public double getScoreDist(RecPairId recPairId)
Get the computed score distance for a record pair.- Parameters:
recPairId- - the ID of the requested pair.- Returns:
- the score distance for the given pair, or 0 if the pair is not included in this hint.
-
size
public int size()
- Returns:
- the number of record pairs in this hint.
-
-