Class HintAddPairs
- java.lang.Object
-
- com.tibco.patterns.learn.api.hint.HintAddPairs
-
- All Implemented Interfaces:
Hint
- Direct Known Subclasses:
HintAddLabel,HintAddUnderrepr,HintAddUntrained,HintAddUntrainedInTable
public abstract class HintAddPairs extends java.lang.Object implements Hint
A hint to select additional record pairs for specified subsets. Stores a family of specific RLink subsets that the pairs should be added to. Provides functionality to filter data table records that correspond to the specific RLink subset, thus assisting in selecting suitable record pairs for each suggested subset.
-
-
Field Summary
Fields Modifier and Type Field Description protected SubsetFamilysubsets
-
Constructor Summary
Constructors Modifier Constructor Description protectedHintAddPairs(SubsetFamily subsets)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetCount(java.util.List<java.lang.Boolean> subset)java.util.Set<java.util.List<java.lang.Boolean>>getSubsets()intsize()booleansuitableRecord(java.util.List<java.lang.Boolean> subset, java.util.List<java.lang.String> fieldValues)Filters a record in a data table.java.lang.StringtoString()
-
-
-
Field Detail
-
subsets
protected final SubsetFamily subsets
-
-
Constructor Detail
-
HintAddPairs
protected HintAddPairs(SubsetFamily subsets)
- Parameters:
subsets- must contain all subsets for this hint.
-
-
Method Detail
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
suitableRecord
public final boolean suitableRecord(java.util.List<java.lang.Boolean> subset, java.util.List<java.lang.String> fieldValues)Filters a record in a data table. Provides functionality to filter the data table in order to select pairs for the specific RLink subset.- Parameters:
subset- - the RLink subset that this filter applies to.fieldValues- - all non-key field values of the table record. The fields must match the allFields parameter used to create feature query and features. Nulls and empty strings are considered to be "empty" values.- Returns:
- true if the given record is potentially suitable for creating record pairs for the specified subset from this subset family
- Throws:
java.lang.IllegalArgumentException- if subset does not correspond to one of the subsets stored in this subset family.
-
size
public final int size()
- Returns:
- the number of subsets that require additional record pairs.
-
getSubsets
public final java.util.Set<java.util.List<java.lang.Boolean>> getSubsets()
- Returns:
- unmodifiable set that contains all subsets.
-
getCount
public final int getCount(java.util.List<java.lang.Boolean> subset)
- Returns:
- the number of pairs for the subset with the given index.
-
-