Class NullTableFilter<ROW_OBJECT>

  • Type Parameters:
    ROW_OBJECT - the type of the row of the table model using this filter
    All Implemented Interfaces:
    TableFilter<ROW_OBJECT>

    public class NullTableFilter<ROW_OBJECT>
    extends java.lang.Object
    implements TableFilter<ROW_OBJECT>
    A table filter that represents the state of having no filter. This allows us to not have to use null to have multiple meanings.
    • Constructor Summary

      Constructors 
      Constructor Description
      NullTableFilter()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean acceptsRow​(ROW_OBJECT rowObject)
      Returns true if this filter matches the given row (data)
      boolean equals​(java.lang.Object obj)  
      int hashCode()  
      boolean isEmpty()
      A method that allows filters to report that they have nothing to actually filter.
      boolean isSubFilterOf​(TableFilter<?> tableFilter)
      Returns true if this filter is a more specific version of the given filter.
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • NullTableFilter

        public NullTableFilter()
    • Method Detail

      • acceptsRow

        public boolean acceptsRow​(ROW_OBJECT rowObject)
        Description copied from interface: TableFilter
        Returns true if this filter matches the given row (data)
        Specified by:
        acceptsRow in interface TableFilter<ROW_OBJECT>
        Parameters:
        rowObject - the current row object
        Returns:
        true if the element at the given row matches this filter.
      • isSubFilterOf

        public boolean isSubFilterOf​(TableFilter<?> tableFilter)
        Description copied from interface: TableFilter
        Returns true if this filter is a more specific version of the given filter.

        For example, if this filter is a 'starts with' text filter, with the value of 'bobo', then if the given filter is also a 'starts with' filter, with a value of 'bob', then this filter is considered a sub-filter of the given sub-filter.

        Specified by:
        isSubFilterOf in interface TableFilter<ROW_OBJECT>
        Parameters:
        tableFilter - the filter to check
        Returns:
        true if this filter is a sub-filter of the given filter
      • isEmpty

        public boolean isEmpty()
        Description copied from interface: TableFilter
        A method that allows filters to report that they have nothing to actually filter. This is useful for empty/null filters.
        Specified by:
        isEmpty in interface TableFilter<ROW_OBJECT>
        Returns:
        true if this filter will not perform any filtering
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object