LibreOffice Module xmerge (master) 1
Public Member Functions | Private Attributes | List of all members
org.openoffice.xmerge.util.IntArrayList Class Reference

This is a convenience class used to create an ArrayList of integers. More...

Collaboration diagram for org.openoffice.xmerge.util.IntArrayList:
[legend]

Public Member Functions

 IntArrayList ()
 Constructor. More...
 
 IntArrayList (int initialCapacity)
 Constructor. More...
 
void ensureCapacity (int minCapacity)
 This method ensures that the list is large enough for minCapacity elements. More...
 
void ensureCapacityAndFill (int minCapacity, int fillValue)
 This method ensures that the list is large enough for minCapacity elements. More...
 
void set (int index, int value)
 This method sets an element of the list to the input integer value. More...
 
void add (int value)
 This method appends an element to the list. More...
 
int get (int index)
 This method gets the integer value stored in element index. More...
 
int size ()
 This method gets the size of the list. More...
 

Private Attributes

final ArrayList< Integer > list
 The list to hold our integers. More...
 

Detailed Description

This is a convenience class used to create an ArrayList of integers.

Definition at line 26 of file IntArrayList.java.

Constructor & Destructor Documentation

◆ IntArrayList() [1/2]

org.openoffice.xmerge.util.IntArrayList.IntArrayList ( )
inline

Constructor.

Creates the list with 0 length.

Definition at line 36 of file IntArrayList.java.

References org.openoffice.xmerge.util.IntArrayList.list.

◆ IntArrayList() [2/2]

org.openoffice.xmerge.util.IntArrayList.IntArrayList ( int  initialCapacity)
inline

Constructor.

Parameters
initialCapacityInitial capacity of the list.

Definition at line 45 of file IntArrayList.java.

References org.openoffice.xmerge.util.IntArrayList.list.

Member Function Documentation

◆ add()

void org.openoffice.xmerge.util.IntArrayList.add ( int  value)
inline

This method appends an element to the list.

Parameters
valueThe integer value that we assign to the element that we are appending to the list.

Definition at line 101 of file IntArrayList.java.

References Integer, org.openoffice.xmerge.util.IntArrayList.list, and value.

◆ ensureCapacity()

void org.openoffice.xmerge.util.IntArrayList.ensureCapacity ( int  minCapacity)
inline

This method ensures that the list is large enough for minCapacity elements.

Parameters
minCapacityThe minimum capacity of the list.

Definition at line 55 of file IntArrayList.java.

References org.openoffice.xmerge.util.IntArrayList.list.

◆ ensureCapacityAndFill()

void org.openoffice.xmerge.util.IntArrayList.ensureCapacityAndFill ( int  minCapacity,
int  fillValue 
)
inline

This method ensures that the list is large enough for minCapacity elements.

It also fills in the new slots in the list with the integer value input as fillValue.

Parameters
minCapacityThe minimum capacity of the list.
fillValueThis method adds in an integer for each slot that was added to ensure that the list meets the minimum capacity. fillValue is the value used as the initial value of these added elements.

Definition at line 72 of file IntArrayList.java.

References i, Integer, and org.openoffice.xmerge.util.IntArrayList.list.

◆ get()

int org.openoffice.xmerge.util.IntArrayList.get ( int  index)
inline

This method gets the integer value stored in element index.

Parameters
indexThe index in the list of the element we wish to get the value from.
Returns
The value of the data stored in element index.

Definition at line 113 of file IntArrayList.java.

References index, and org.openoffice.xmerge.util.IntArrayList.list.

◆ set()

void org.openoffice.xmerge.util.IntArrayList.set ( int  index,
int  value 
)
inline

This method sets an element of the list to the input integer value.

Parameters
indexThe index in the list of the element we wish to set.
valueThe integer value that we assign to the selected element of the list.

Definition at line 91 of file IntArrayList.java.

References index, Integer, org.openoffice.xmerge.util.IntArrayList.list, and value.

◆ size()

int org.openoffice.xmerge.util.IntArrayList.size ( )
inline

This method gets the size of the list.

Returns
The size of the list.

Definition at line 122 of file IntArrayList.java.

References org.openoffice.xmerge.util.IntArrayList.list.

Member Data Documentation

◆ list

final ArrayList<Integer> org.openoffice.xmerge.util.IntArrayList.list
private

The documentation for this class was generated from the following file: