Class IntSet
java.lang.Object
org.postgresql.util.internal.IntSet
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanadd(int value) Adds a single value to the set.voidaddAll(Collection<? extends Integer> values) Adds all the values to the set.voidclear()Clears the contents of the set.booleancontains(int value) Checks if a given value belongs to the set.booleanremove(int value) Removes a value from the set.Returns a mutable snapshot of the values stored in the current set.
-
Field Details
-
MAX_OID_TO_STORE_IN_BITSET
private static final int MAX_OID_TO_STORE_IN_BITSETMaximal Oid that will bs stored inBitSet. If Oid exceeds this value, then it will be stored inSet<Int>only. In theory, Oids can be up to 32bit, so we want to limit per-connection memory utilization. AllowBitSetto consume up to 8KiB (one for send and one for receive).- See Also:
-
set
-
bitSet
Contains values in range of [0..MAX_OID_TO_STORE_IN_BITSET].
-
-
Constructor Details
-
IntSet
public IntSet()
-
-
Method Details
-
clear
public void clear()Clears the contents of the set. -
addAll
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
-