Module VirtualizedFX
Class IndexBiMap.RowsStateMap<T,C extends VFXCell<T>>
java.lang.Object
io.github.palexdev.virtualizedfx.utils.IndexBiMap<VFXTableColumn<T,?>,C>
io.github.palexdev.virtualizedfx.utils.IndexBiMap.StateMapBase<VFXTableColumn<T,?>,T,C>
io.github.palexdev.virtualizedfx.utils.IndexBiMap.RowsStateMap<T,C>
- 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.
-
Nested Class Summary
Nested classes/interfaces inherited from class io.github.palexdev.virtualizedfx.utils.IndexBiMap
IndexBiMap.RowsStateMap<T,
C extends VFXCell<T>>, IndexBiMap.StateMap<T, C extends VFXCell<T>>, IndexBiMap.StateMapBase<K, T, C extends VFXCell<T>> -
Field Summary
FieldsFields inherited from class io.github.palexdev.virtualizedfx.utils.IndexBiMap
byIndex, byKey
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetSingle
(VFXTableColumn<T, ?> column) Basically a shortcut forbyIndex.get(byKey.get(column).getFirst())
,null
check included.Methods inherited from class io.github.palexdev.virtualizedfx.utils.IndexBiMap.StateMapBase
pollFirst, pollLast
-
Field Details
-
EMPTY
-
-
Constructor Details
-
RowsStateMap
public RowsStateMap()
-
-
Method Details
-
getSingle
Basically a shortcut forbyIndex.get(byKey.get(column).getFirst())
,null
check included.- Returns:
- the cell mapped to the given column or
null
if the indexesSet
associated to the column is empty
-