Interface ConsolidatableCollection

All Known Subinterfaces:
XBag<E>, XBasicEnum<E>, XBasicList<E>, XBasicSequence<E>, XBasicTable<K,​V>, XBasicTable.Keys<K,​V>, XBasicTable.Values<K,​V>, XChart<K,​V>, XChart.Keys<K,​V>, XChart.Values<K,​V>, XCollection<E>, XDecreasingEnum<E>, XDecreasingList<E>, XDecreasingSequence<E>, XEnum<E>, XLadder<E>, XList<E>, XMap<K,​V>, XMap.Keys<K,​V>, XMap.Values<K,​V>, XProcessingBag<E>, XProcessingCollection<E>, XProcessingEnum<E>, XProcessingList<E>, XProcessingMap<K,​V>, XProcessingMap.Keys<K,​V>, XProcessingMap.Values<K,​V>, XProcessingSequence<E>, XProcessingSet<E>, XProcessingSortation<E>, XRank<E>, XRemovingBag<E>, XRemovingCollection<E>, XRemovingEnum<E>, XRemovingList<E>, XRemovingMap<K,​V>, XRemovingSequence<E>, XRemovingSet<E>, XRemovingSortation<E>, XSequence<E>, XSet<E>, XSortation<E>, XTable<K,​V>, XTable.Keys<K,​V>, XTable.Values<K,​V>
All Known Implementing Classes:
ArrayCollector, BulkList, EnumProcessor, EqBulkList, EqHashEnum, EqHashTable, EqHashTable.Keys, EqHashTable.Values, HashEnum, HashTable, HashTable.Keys, HashTable.Values, LimitList, ListProcessor, LockedCollection, LockedList, LockedMap, MutexSet, OpenAdressingMiniSet, Single, SubList, SubListProcessor, SubProcessor, SynchCollection, SynchList, SynchSet, Threaded, ThreadedInstantiating

public interface ConsolidatableCollection
  • Method Summary

    Modifier and Type Method Description
    long consolidate()
    Consolidates the internal storage of this collection by discarding all elements of the internal storage that have become obsolete or otherwise unneeded anymore.
  • Method Details

    • consolidate

      long consolidate()
      Consolidates the internal storage of this collection by discarding all elements of the internal storage that have become obsolete or otherwise unneeded anymore. (e.g. WeakReference entries whose reference has been cleared).

      If this is not possible or not needed in the concrete implementation, this method does nothing and returns 0.

      Returns:
      the number of discarded entries.