Class IndexBiMap.StateMapBase<K,T,C extends VFXCell<T>>

java.lang.Object
io.github.palexdev.virtualizedfx.utils.IndexBiMap<K,C>
io.github.palexdev.virtualizedfx.utils.IndexBiMap.StateMapBase<K,T,C>
Direct Known Subclasses:
IndexBiMap.RowsStateMap, IndexBiMap.StateMap
Enclosing class:
IndexBiMap<K,V>

public static class IndexBiMap.StateMapBase<K,T,C extends VFXCell<T>> extends IndexBiMap<K,C>
Extension of IndexBiMap that introduces polling methods: pollFirst(), pollLast().

Also base class to map the items of a VirtualizedFX container to VFXCell instances.

  • Constructor Details

    • StateMapBase

      public StateMapBase()
  • Method Details

    • pollFirst

      public Map.Entry<Integer,C> pollFirst()
      Removes the first entry from the byIndex map by using SequencedMap.pollFirstEntry().

      Note that this won't remove the "corresponding" entry from the byKey map, leaving this in an invalid state.

      Ideally, this should be used when "transitioning" to a new bimap.

    • pollLast

      public Map.Entry<Integer,C> pollLast()
      Removes the last entry from the byIndex map by using SequencedMap.pollLastEntry().

      Note that this won't remove the "corresponding" entry from the byKey map, leaving this in an invalid state.

      Ideally, this should be used when "transitioning" to a new bimap.