Class SynchronizedChunkyList<E>

    • Constructor Detail

      • SynchronizedChunkyList

        public SynchronizedChunkyList()
        Creates a new SynchronizedChunkyList with the default chunk size.
      • SynchronizedChunkyList

        public SynchronizedChunkyList​(int chunkSize)
        Creates a new SynchronizedChunkyList with the given chunk size.
        Parameters:
        chunkSize - the number of elements per chunk; must be at least 1
      • SynchronizedChunkyList

        public SynchronizedChunkyList​(SynchronizedChunkyList<? extends E> other)
        Creates a faithful copy of the given SynchronizedChunkyList, preserving its chunk size, both strategies, and the internal chunk structure.

        A read lock is acquired on other for the duration of the copy, guaranteeing a consistent snapshot.

        Parameters:
        other - the list to copy
      • SynchronizedChunkyList

        public SynchronizedChunkyList​(int chunkSize,
                                      SynchronizedChunkyList<? extends E> other)
        Creates a copy of the given SynchronizedChunkyList with a different chunk size, preserving both strategies.

        A read lock is acquired on other for the duration of the copy, guaranteeing a consistent snapshot.

        Parameters:
        chunkSize - the new chunk size; must be at least 1
        other - the list to copy
      • SynchronizedChunkyList

        public SynchronizedChunkyList​(Collection<? extends E> c)
        Creates a new SynchronizedChunkyList with the default chunk size containing all elements of the given collection, in the order returned by its iterator.
        Parameters:
        c - the collection whose elements are to be placed into this list
      • SynchronizedChunkyList

        public SynchronizedChunkyList​(int chunkSize,
                                      Collection<? extends E> c)
        Creates a new SynchronizedChunkyList with the given chunk size containing all elements of the given collection, in the order returned by its iterator.
        Parameters:
        chunkSize - the number of elements per chunk; must be at least 1
        c - the collection whose elements are to be placed into this list