net.rim.device.api.collection
Interface ReadableIntList

All Superinterfaces:
Collection
All Known Implementing Classes:
IntSortedReadableList

public interface ReadableIntList
extends Collection

Provides array-like read access to a collection of integer elements.

Since:
BlackBerry API 3.6.0

Method Summary
 int getAt(int index, int count, int[] elements, int destIndex)
          Retrieves range of elements starting at provided index.
 int getIndex(int element)
          Retrieves index by element.
 int getIntAt(int index)
          Retrieves element by index.
 int size()
          Retrieves the number of elements in this collection.
 



Method Detail

size

int size()
Retrieves the number of elements in this collection.

Returns:
Number of elements in this collection.
Since:
BlackBerry API 3.6.0

getIntAt

int getIntAt(int index)
Retrieves element by index.

Parameters:
index - Index of the element to retrieve.
Returns:
Long integer element at provided index.
Throws:
ArrayIndexOutOfBounds - If index parameter is not valid.
Since:
BlackBerry API 3.6.0

getAt

int getAt(int index,
          int count,
          int[] elements,
          int destIndex)
Retrieves range of elements starting at provided index.

Parameters:
index - Index of first element to retrieve.
count - Number of elements to retrieve.
elements - integer array to contain returned elements; this array must have enough space to hold the number of elements you expect to receive.
destIndex - Index within the destination array to contain the first element retrieved (the destination array must therefore be at least destIndex + count elements long).
Returns:
Number of elements actually retrieved.
Throws:
ArrayIndexOutOfBounds - If index parameter is not valid.
Since:
BlackBerry API 3.6.0

getIndex

int getIndex(int element)
Retrieves index by element.

Note: This operation may be linear with respect to the number of elements in the list.

Parameters:
element - Element to locate.
Returns:
Index of provided element, or -1 if the element isn't contained in this collection.
Since:
BlackBerry API 3.6.0





Copyright 1999-2010 Research In Motion Limited. 295 Phillip Street, Waterloo, Ontario, Canada, N2L 3W8. All Rights Reserved.
Copyright 1993-2003 Sun Microsystems, Inc. 901 San Antonio Road, Palo Alto, California, 94303, U.S.A. All Rights Reserved.
Copyright 2002-2003 Nokia Corporation All Rights Reserved.
Java is a trademark of Sun Microsystems, Inc.