All Libraries | This Library | Package | Class | Use | Tree | Deprecated | Index | Grand Index | Help
|  | Components |
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.sas.collection
Interface StaticCollectionInterface

All Superinterfaces:
  java.lang.Cloneable, com.sas.collection.ContentsChangedSource, com.sas.util.Countable, com.sas.util.Enumerable, com.sas.beans.PropertyChangeSource, com.sas.PublicClonable

All Known Subinterfaces:
  AssociationListInterface, CollectionInterface, DictionaryInterface, OrderedCollectionInterface, SelectionGroupInterface, SortedCollectionInterface, StaticDictionaryInterface, StaticOrderedCollectionInterface, StringCollectionInterface

All Known Implementing Classes:
  AssociationList, BaseCollection, CellSelection, CellVectorSelection, Collection, CollectionMirror, ColorList, ColorNameList, ColumnSelection, DefaultColorList, DefaultFontFamilyList, DefaultFontList, Dictionary, File, FileList, FileSystemList, FontList, IMDBTable, KeyCollection, OrderedCollection, OrderedListCollection, PrinterList, RGBList, RowSelection, Selection, SelectionGroup, Set, SortedCollection, StaticCollection, StaticDictionary, StaticOrderedCollection, StaticStringList, StringCollection

    public interface StaticCollectionInterface

extends com.sas.PublicClonable, com.sas.collection.ContentsChangedSource, com.sas.beans.PropertyChangeSource, com.sas.util.Countable, com.sas.util.Enumerable

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 ``ContentsChangedEvent`` events when the contents have changed. They also send a ``PropertyChangeEvent`` to indicate changes (with a null property name, null old value, and new value). You can listen for either event.

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 ``Enumeration getItems()`` 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.

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

### contains

    boolean contains(java.lang.Object element)

  Test for the presence of an object in this collection

  Parameters:
    `element` - the item to search for
  Returns:
    True if and only if the item exists
  Throws:
    `java.lang.ClassCastException` - In some implementations, the objects that are stored may be restricted to a particular type (such as String). (a RuntimeException)

### apply

    void apply(com.sas.util.ApplyInterface action)

  Applies the action to every item in the collection. This is a general way to modify all the items in a collection.

  Parameters:
    `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`

### clone

    java.lang.Object clone()
                           throws java.lang.CloneNotSupportedException

  Clone the object.

  Specified by:
    `clone` in interface `com.sas.PublicClonable`
  Returns:
    a clone of this collection.
  Throws:
    `java.lang.CloneNotSupportedException` - if the object could not be cloned.

All Libraries | This Library | Package | Class | Use | Tree | Deprecated | Index | Grand Index | Help
|  | Components |
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2009 SAS Institute Inc. All Rights Reserved.