Package ghidra.util.database

# Class DBSynchronizedSpliterator<T>

java.lang.Object
ghidra.util.database.DBSynchronizedSpliterator<T>

Type Parameters:
  `T` - the type of elements

All Implemented Interfaces:
  `Spliterator<T>`

public class DBSynchronizedSpliterator<T> extends Object implements Spliterator<T>
Wraps an unsynchronized spliterator in one that synchronizes on a given `Lock`

- ## Nested Class Summary

  ## Nested classes/interfaces inherited from interface java.util.Spliterator

  `Spliterator.OfDouble, Spliterator.OfInt, Spliterator.OfLong, Spliterator.OfPrimitive<T,T_CONS,T_SPLITR extends Spliterator.OfPrimitive<T,T_CONS,T_SPLITR>>`

- ## Field Summary

  ### Fields inherited from interface java.util.Spliterator

  `CONCURRENT, DISTINCT, IMMUTABLE, NONNULL, ORDERED, SIZED, SORTED, SUBSIZED`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `DBSynchronizedSpliterator(Spliterator<T> spliterator, Lock lock)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `int`
  `characteristics()`
  `long`
  `estimateSize()`
  `boolean`
  `tryAdvance(Consumer<? super T> action)`
  `Spliterator<T>`
  `trySplit()`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

  ### Methods inherited from interface java.util.Spliterator

  `forEachRemaining, getComparator, getExactSizeIfKnown, hasCharacteristics`

- ## Constructor Details

  - ### DBSynchronizedSpliterator

    public DBSynchronizedSpliterator(Spliterator<T> spliterator, Lock lock)

- ## Method Details

  - ### tryAdvance

    public boolean tryAdvance(Consumer<? super T> action)
    Specified by:
      `tryAdvance` in interface `Spliterator<T>`

  - ### trySplit

    public Spliterator<T> trySplit()
    Specified by:
      `trySplit` in interface `Spliterator<T>`

  - ### estimateSize

    public long estimateSize()
    Specified by:
      `estimateSize` in interface `Spliterator<T>`

  - ### characteristics

    public int characteristics()
    Specified by:
      `characteristics` in interface `Spliterator<T>`