APIdia Launch Partner
Top Description Fields Constructors Methods
sun.java2d.xr

public Class GrowableIntArray

extends Object
Class Inheritance
Known Direct Subclasses
sun.java2d.xr.GrowablePointArray, sun.java2d.xr.GrowableRectArray, sun.java2d.xr.GrowableEltArray
Imports
java.util.*

Growable int array, designed to allow subclasses to emulate the behaviour of value types.
Author
Clemens Eisserer

Field Summary

Modifier and TypeField and Description
pack-priv int[]
pack-priv int
pack-priv int

Constructor Summary

AccessConstructor and Description
public
GrowableIntArray(int cellSize, int initialSize)

Method Summary

Modifier and TypeMethod and Description
public final void
addInt(int i)

public void
public int[]
getArray()

Returns: a direct reference to the backing array.

protected final int
getCellIndex(int cellIndex)

public final int
getInt(int cellIndex)

private int
public final int
getNextIndex()

Returns the index of the next free cell, and grows the backing arrays if required.

public final int
getSize()

Returns: The number of stored cells.

public int[]
getSizedArray()

Returns: a copy of the backing array.

protected void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

arrayback to summary
pack-priv int[] array
cellSizeback to summary
pack-priv int cellSize
sizeback to summary
pack-priv int size

Constructor Detail

GrowableIntArrayback to summary
public GrowableIntArray(int cellSize, int initialSize)

Method Detail

addIntback to summary
public final void addInt(int i)
clearback to summary
public void clear()
getArrayback to summary
public int[] getArray()
Returns:int[]

a direct reference to the backing array.

getCellIndexback to summary
protected final int getCellIndex(int cellIndex)
getIntback to summary
public final int getInt(int cellIndex)
getNextCellIndexback to summary
private int getNextCellIndex()
getNextIndexback to summary
public final int getNextIndex()

Returns the index of the next free cell, and grows the backing arrays if required.

getSizeback to summary
public final int getSize()
Returns:int

The number of stored cells.

getSizedArrayback to summary
public int[] getSizedArray()
Returns:int[]

a copy of the backing array.

growArrayback to summary
protected void growArray()