Package org.postgresql.util.internal

# Class IntSet

java.lang.Object
org.postgresql.util.internal.IntSet

public final class IntSet extends Object
Read-optimized `Set` for storing `Oid` values. Note: the set does not support nullable values.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `IntSet()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `boolean`
  `add(int value)`
  Adds a single value to the set.
  `void`
  `addAll(Collection<? extends Integer> values)`
  Adds all the values to the set.
  `void`
  `clear()`
  Clears the contents of the set.
  `boolean`
  `contains(int value)`
  Checks if a given value belongs to the set.
  `boolean`
  `remove(int value)`
  Removes a value from the set.
  `Set<Integer>`
  `toMutableSet()`
  Returns a mutable snapshot of the values stored in the current set.

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

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

- ## Constructor Details

  - ### IntSet

    public IntSet()

- ## Method Details

  - ### clear

    public void clear()
    Clears the contents of the set.

  - ### addAll

    public void addAll(Collection<? extends Integer> values)
    Adds all the values to the set.
    Parameters:
      `values` - set of values to add

  - ### add

    public boolean add(int value)
    Adds a single value to the set.
    Parameters:
      `value` - value to add
    Returns:
      true if the set did not already contain the specified value

  - ### remove

    public boolean remove(int value)
    Removes a value from the set.
    Parameters:
      `value` - value to remove
    Returns:
      true if the element was

  - ### contains

    public boolean contains(int value)
    Checks if a given value belongs to the set.
    Parameters:
      `value` - value to check
    Returns:
      true if the value belons to the set

  - ### toMutableSet

    public Set<Integer> toMutableSet()
    Returns a mutable snapshot of the values stored in the current set.
    Returns:
      a mutable snapshot of the values stored in the current set