|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnet.rim.device.api.collection.util.ReadableListUtil
public class ReadableListUtil
Utility methods for retrieving data from a readable list.
This class assumes that (a) the readable list passed in properly implements
ReadableList.size() and ReadableList.getAt(int), and (b) that
the invoker of this class's methods does any locking or synchronizing required.
| Constructor Summary | ||
|---|---|---|
ReadableListUtil()
Constructs a new ReadableListUtil instance. |
||
| Method Summary | ||
|---|---|---|
static int |
getAt(int start,
int count,
Object[] dest,
int destIndex,
ReadableList list)
Retrieves range of elements starting at provided index. |
|
static int |
getIndex(Object element,
ReadableList list)
Retrieves index by element. |
|
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ReadableListUtil()
| Method Detail |
|---|
public static int getAt(int start,
int count,
Object[] dest,
int destIndex,
ReadableList list)
start - Index of first element to retrieve.count - Number of elements to retrieve.dest - Object array to contain returned elements; this array must
have enough space to hold the number of elements you expect to receive.destIndex - Index within destination array to contain the first
element retrieved (the destination array must therefore be at least
destIndex + count elements long).list - Readable list from which to fetch the elements.
ArrayIndexOutOfBoundsException - If start parameter is not valid.
public static int getIndex(Object element,
ReadableList list)
Note: This operation may be linear with respect to the number of elements in the list.
element - Element to locate.list - Readable list in which to search for the element.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
Copyright 1999-2011 Research In Motion Limited. 295 Phillip Street, Waterloo, Ontario, Canada, N2L 3W8. All Rights Reserved.
Java is a trademark of Oracle America Inc. in the US and other countries.
Legal