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 CollectionInterface

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

All Known Subinterfaces:
  AssociationListInterface, DictionaryInterface, OrderedCollectionInterface, SelectionGroupInterface, SortedCollectionInterface, StringCollectionInterface

All Known Implementing Classes:
  AssociationList, Collection, ColorList, ColorNameList, DefaultColorList, DefaultFontFamilyList, DefaultFontList, Dictionary, FontList, KeyCollection, OrderedCollection, OrderedListCollection, RGBList, SelectionGroup, Set, SortedCollection, StringCollection

    public interface CollectionInterface

extends StaticCollectionInterface

A collection interface, for objects which store and retrieve values. The order of the values in the collection is unspecified.

Method Summary
`abstract void` | `add(java.lang.Object item)` Add an item to this collection.
`abstract void` | `addItems(java.util.Enumeration items)` Add all elements of an enumeration to this collection.
`abstract java.lang.Object` | `clone()` Clone the object.
`abstract boolean` | `remove(java.lang.Object element)` Remove an item from this collection.
`abstract void` | `removeAll()` Remove all items from this collection
`abstract int` | `removeAll(java.lang.Object element)` Remove an all occurrences of an item from this collection.

Methods inherited from interface com.sas.collection.StaticCollectionInterface
`apply, contains`

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

### add

    void add(java.lang.Object item)

  Add an item to this collection.

  Parameters:
    `item` - an object to add to this collection.
  Throws:
    `java.lang.ClassCastException` - In some implementations, the objects that are stored may be restricted to a particular type (such as String). (a RuntimeException)

### addItems

    void addItems(java.util.Enumeration items)

  Add all elements of an enumeration to this collection. Note: to add the contents of another collection, use targetCollection.addItems(otherCollection.getItems());

  Parameters:
    `items` - an Enumeration of items to add to this collection
  Throws:
    `java.lang.ClassCastException` - In some implementations, the objects that are stored may be restricted to a particular type (such as String). (a RuntimeException)

### remove

    boolean remove(java.lang.Object element)

  Remove an item from this collection. If the element appears multiple times, only the first occurrence is removed.

  Parameters:
    `element` - the item to remove
  Returns:
    true if item removed, false if not.
  Throws:
    `java.lang.ClassCastException` - In some implementations, the objects that are stored may be restricted to a particular type (such as String). (a RuntimeException)

### removeAll

    void removeAll()

  Remove all items from this collection

### removeAll

    int removeAll(java.lang.Object element)

  Remove an all occurrences of an item from this collection.

  Parameters:
    `element` - the item to remove
  Returns:
    the number of times the element occurred in this collection.

### clone

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

  Clone the object.

  Specified by:
    `clone` in interface `com.sas.PublicClonable`
  Specified by:
    `clone` in interface `StaticCollectionInterface`
  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.