|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ReadableSet
Provides read access to a set-type collection.
Method Summary | ||
---|---|---|
boolean |
contains(Object element)
Determines if this collection contains an element. |
|
Enumeration |
getElements()
Retrieves an enumeration of this collection's elements. |
|
int |
getElements(Object[] elements)
Retrieves this collection's elements. |
|
int |
size()
Retrieves the number of elements in this collection. |
Method Detail |
---|
int size()
boolean contains(Object element)
element
- Element to look for.
Enumeration getElements()
int getElements(Object[] elements)
The array you provide to contain the collection's elements must be
large enough to contain them. Accordingly, you should synchronize on this
collection, invoke ReadableSet.size()
, create an array of the required size,
and then invoke this method. This ensures that the collection's size
won't change by the time you get to actually retrieving its elements.
This method also completely erases the current contents of your object array out-parameter.
elements
- Object array to contain returned elements; must be large
enough to retrieve the collection's elements.
|
|||||||||
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