Interface FilterModel.Items<T>

Type Parameters:
T - the item type
All Superinterfaces:
Mutable<Collection<T>>, Observable<Collection<T>>, Observer<Collection<T>>
All Known Subinterfaces:
FilterComboBoxModel.ComboBoxItems<T>
Enclosing interface:
FilterModel<T>

public static interface FilterModel.Items<T> extends Mutable<Collection<T>>
A Mutable controlling the items in a FilterModel
  • Method Details

    • addItem

      boolean addItem(T item)
      Adds the given item to this model. Note that if the item does not pass the FilterModel.VisibleItems.predicate(), it will be filtered right away.
      Parameters:
      item - the item to add
      Returns:
      true if the item was added to the visible items
    • addItems

      boolean addItems(Collection<T> items)
      Adds the given items to the bottom of this table model. Note that if an item does not pass the FilterModel.VisibleItems.predicate(), it will be filtered right away.
      Parameters:
      items - the items to add
      Returns:
      true if one or more of the items was added to the visible items
    • removeItem

      boolean removeItem(T item)
      Removes the given item from this model
      Parameters:
      item - the item to remove from the model
      Returns:
      true if the item was removed from the visible items
    • removeItems

      boolean removeItems(Collection<T> items)
      Removes the given items from this table model
      Parameters:
      items - the items to remove from the model
      Returns:
      true if one or more of the items were removed from the visible items
    • visible

      Returns:
      a FilterModel.VisibleItems providing access to the visible items, in the order they appear in the model
    • filtered

      Returns:
      a FilterModel.FilteredItems providing access to the filtered items
    • contains

      boolean contains(T item)
      Returns true if the model contain the given item, as visible or filtered.
      Parameters:
      item - the item
      Returns:
      true if this model contains the item
    • count

      int count()
      Returns:
      the total number of items, visible and filtered
    • filter

      void filter()
      Filters the items according to the predicate specified by FilterModel.VisibleItems.predicate(). If no visible predicate is specified this method does nothing. This method does not interfere with the internal ordering of the visible items.
      See Also: