Package org.postgresql.util
Class IntList
- java.lang.Object
-
- org.postgresql.util.IntList
-
public final class IntList extends java.lang.Object
A specialized class to store a list ofint
values, so it does not need auto-boxing. Note: this is a driver-internal class, and it is not intended to be used outside the driver.
-
-
Field Summary
Fields Modifier and Type Field Description private static int[]
EMPTY_INT_ARRAY
private int[]
ints
private int
size
-
Constructor Summary
Constructors Constructor Description IntList()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
add(int i)
void
clear()
private void
ensureCapacity(int size)
int
get(int i)
int
size()
int[]
toArray()
Returns an array containing all the elements in this list.java.lang.String
toString()
-
-
-
Method Detail
-
add
public void add(int i)
-
ensureCapacity
private void ensureCapacity(int size)
-
size
public int size()
-
get
public int get(int i)
-
clear
public void clear()
-
toArray
public int[] toArray()
Returns an array containing all the elements in this list. The modifications of the returned array will not affect this list.- Returns:
- an array containing all the elements in this list
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-