Class 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.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int getCount​(java.util.List<java.lang.Boolean> subset)  
      java.util.Set<java.util.List<java.lang.Boolean>> getSubsets()  
      int size()  
      boolean suitableRecord​(java.util.List<java.lang.Boolean> subset, java.util.List<java.lang.String> fieldValues)
      Filters a record in a data table.
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • 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:
        toString in class java.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.