Class SubtypeFilter

java.lang.Object
net.sf.basedb.clients.web.extensions.list.SubtypeFilter
All Implemented Interfaces:
Filter<Annotatable>

public class SubtypeFilter
extends Object
implements Filter<Annotatable>
Filter implementation that accept (annotatable) items of a given subtype. It can also accept Item lists with a matching ItemList.getItemSubtype() (or without subtype if the member type matches).
Since:
3.16
Author:
nicklas
  • Field Details

    • itemType

      private final Item itemType
    • subtype

      private final ItemSubtype subtype
  • Constructor Details

    • SubtypeFilter

      public SubtypeFilter​(ItemSubtype subtype)
  • Method Details

    • evaluate

      public boolean evaluate​(Annotatable item)
      Description copied from interface: Filter
      Evaluate if the given object should pass the filter or not.
      Specified by:
      evaluate in interface Filter<Annotatable>
      Parameters:
      item - The object to evaluate
      Returns:
      TRUE if the object passes the filter, FALSE otherwise