Class IndexBiMap.RowsStateMap<T,C extends VFXCell<T>>

Enclosing class:
IndexBiMap<K,V>

public static class IndexBiMap.RowsStateMap<T,C extends VFXCell<T>> extends IndexBiMap.StateMapBase<VFXTableColumn<T,?>,T,C>
Extension of IndexBiMap.StateMapBase which uses mappings of type: [Integer -> VFXCell], [Column -> Collection<Integer>] and [Column -> Integer -> VFXCell].

Used by the table rows to store their state, allowing high re-usability of cells, which translates to high performance.

Q: Why by cells are reverse-mapped by columns?

A: VirtualizedFX is a complex library, not because the code is hard, rather development is. The core thing to always keep in mind is performance. The goal of IndexBiMap and its extensions, is to help containers to transition to a new state when changes occur in the dataset. In this specific case, this helps to deal with changes in the table's list of columns.

By having mappings, we can quickly separate the cells that need to be updates from the ones that are ready to go.

  • Field Details

  • Constructor Details

    • RowsStateMap

      public RowsStateMap()
  • Method Details

    • getSingle

      public C getSingle(VFXTableColumn<T,?> column)
      Basically a shortcut for byIndex.get(byKey.get(column).getFirst()), null check included.
      Returns:
      the cell mapped to the given column or null if the indexes Set associated to the column is empty