Interface Filter

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      java.lang.Comparable classify​(Dataset data, int row)
      Returns a classification key for the given row in the dataset.
      Filter copyFilter()
      Creates a copy of this filter.
      java.lang.String getColumnName()
      Returns the name of the column that this filter looks at
      int getDistributionEstimate()
      Given an evenly distributed dataset, how many different classification keys should be expected from this Filter? For instance, a Month filter would return 12, a Day-of-week filter would return 7, while a Year filter would simply return some guess.
      java.lang.String getIconPath()  
      void invalidateCache()
      Called when the dataset being passed to classify has changed.
      boolean isReverseSort()  
      void setColumnName​(java.lang.String s)
      Sets the column that the filter looks at
      void setIconPath​(java.lang.String path)  
      void setReverseSort​(boolean isReverseSort)  
    • Method Detail

      • classify

        java.lang.Comparable classify​(Dataset data,
                                      int row)
        Returns a classification key for the given row in the dataset. If the row can't be classified for some reason, like the classification column not exsiting, null should be returned.
      • invalidateCache

        void invalidateCache()
        Called when the dataset being passed to classify has changed. This is used for Filters who do some work up front on the DataSet the first time classify is called, such as calculating the column index that they are working on.
      • getDistributionEstimate

        int getDistributionEstimate()
        Given an evenly distributed dataset, how many different classification keys should be expected from this Filter? For instance, a Month filter would return 12, a Day-of-week filter would return 7, while a Year filter would simply return some guess. This isn't critical, it is used to try and give arrays reasonable initial sizes so they don't have to re-allocate frequently.
      • copyFilter

        Filter copyFilter()
        Creates a copy of this filter. Used for the customizer
      • getColumnName

        java.lang.String getColumnName()
        Returns the name of the column that this filter looks at
      • setColumnName

        void setColumnName​(java.lang.String s)
        Sets the column that the filter looks at
      • getIconPath

        java.lang.String getIconPath()
      • setIconPath

        void setIconPath​(java.lang.String path)
      • isReverseSort

        boolean isReverseSort()
      • setReverseSort

        void setReverseSort​(boolean isReverseSort)