|
| Components |
|
| |||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||||
public interface StaticCollectionInterface
A static collection interface, for access to but not update of a collection. A Collection is an object which holds or contains other objects. This interface does not constrain how the items are accessed (they may have integer indices, object keys, tree structure, etc.), except that the collection may be enumerated, and you can test if a collection contains an item and determine the number of items in the collection.
Collections generate events when
the contents have changed. They also send a ContentsChangedEvent
to indicate changes (with a null property name, null old value, and new value).
You can listen for either event.
PropertyChangeEvent
Collections implement the Countable interface, so you can use the count()
method to get the number of elements from any collection.
Collections also implement the Enumerable interface, which defines
a method
for obtaining an enumeration
object with which you can iterate over all the items of the collection
in a standard way. Most collections also provide other mechanisms
to iterate over the items.
Enumeration getItems()
| Method Summary | |
|---|---|
abstract void |
apply(com.sas.util.ApplyInterface action)
Applies the action to every item in the collection. |
abstract java.lang.Object |
clone()
Clone the object. |
abstract boolean |
contains(java.lang.Object element)
Test for the presence of an object in this collection |
| Methods inherited from interface com.sas.collection.ContentsChangedSource |
|---|
addContentsChangedListener, removeContentsChangedListener |
| Methods inherited from interface com.sas.beans.PropertyChangeSource |
|---|
addPropertyChangeListener, removePropertyChangeListener |
| Methods inherited from interface com.sas.util.Countable |
|---|
count |
| Methods inherited from interface com.sas.util.Enumerable |
|---|
getItems |
| Method Detail |
|---|
boolean contains(java.lang.Object element)
element - the item to search for
java.lang.ClassCastException - In some implementations,
the objects that are stored may be restricted to a particular
type (such as String). (a RuntimeException)void apply(com.sas.util.ApplyInterface action)
action - An object that provides a function which takes an
object as an argument and then does something to it.
action.apply(pair) is excecuted on successive values
in this collection until all values have been operated on, or until the method
returns ApplyInterface.ABORT
java.lang.Object clone()
throws java.lang.CloneNotSupportedException
clone in interface com.sas.PublicClonablejava.lang.CloneNotSupportedException - if the object could not be cloned.
|
| Components |
|
| |||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||||