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 StaticOrderedCollectionInterface

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

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

All Known Implementing Classes:
  AssociationList, ColorList, ColorNameList, DefaultColorList, DefaultFontFamilyList, DefaultFontList, File, FileList, FileSystemList, FontList, IMDBTable, KeyCollection, OrderedCollection, OrderedListCollection, PrinterList, RGBList, SelectionGroup, SortedCollection, StaticOrderedCollection, StringCollection

    public interface StaticOrderedCollectionInterface

extends StaticCollectionInterface, IndexedGetInterface

A static ordered collection interface defines read access to items in an ordered collection. Items are accessed by their integer index. The `OrderedCollectionInterface` defines the update methods for an ordered collection.

Method Summary
`abstract java.lang.Object` | `clone()` Clone the object.
`abstract boolean` | `equals(StaticOrderedCollectionInterface orderedCollection)` Compare the current items with those in another collection and tell whether the collections are identical.
`abstract int` | `getIndex(java.lang.Object element, int startIndex)` Returns the index of the first occurrence of the item.
`abstract java.util.Enumeration` | `getItems(int start, int end)` Returns an enumeration of a subset of the items from a collection.
`abstract int` | `getLastIndex(java.lang.Object element, int startIndex)` Returns the index of the last occurrence of the item.

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.Enumerable
`getItems`

Methods inherited from interface com.sas.util.IndexedGetInterface
`get`

Methods inherited from interface com.sas.util.Countable
`count`

Method Detail

### equals

    boolean equals(StaticOrderedCollectionInterface orderedCollection)

  Compare the current items with those in another collection and tell whether the collections are identical. The ``equals()`` method is used to compare collection items.

  Parameters:
    `orderedCollection` - Another ordered collection to be compared to.
  Returns:
    true if this collection has the same size and same elements as the other collection, false otherwise.

### getIndex

    int getIndex(java.lang.Object element,
                 int startIndex)

  Returns the index of the first occurrence of the item. The search proceeds from startIndex to the end of the list; the index of the first item that matches the element is returned.

  Parameters:
    `element` - item to search for
    `startIndex` - the position where the search should start
  Returns:
    the zero-based index where the list item was first found, or -1 if the item is not found.
  Throws:
    `java.lang.IndexOutOfBoundsException` - if the index is not in the range `[0..count()-1]`.
    `java.lang.ClassCastException` - In some implementations, the objects that are stored may be restricted to a particular type (such as String).

### getItems

    java.util.Enumeration getItems(int start,
                                   int end)

  Returns an enumeration of a subset of the items from a collection.

  Parameters:
    `start` - the index of the first item, zero based.
    `end` - one past the index of the last item to include in the enumeration, zero based, or -1 to indicate the enumeration should include all remaining elements. Note that the range of elements returned in the Enumeration does not include the end item; this is consistent with ``String.substring(start, end)`` for example.
  Returns:
    an enumeration of the requested elements.
  Throws:
    `java.lang.IndexOutOfBoundsException` - if start is not in the range `[0, count()-1]`, or start > last or end is not in the range `[0, count()]`

### getLastIndex

    int getLastIndex(java.lang.Object element,
                     int startIndex)

  Returns the index of the last occurrence of the item. The search proceeds from the startIndex to the start of the list until an item is found.

  Parameters:
    `element` - the item to search for
    `startIndex` - the position where the search should start
  Returns:
    the zero-based index of the last item matching element, or -1 if the item is not found.
  Throws:
    `java.lang.IndexOutOfBoundsException` - if the index is not in the range [0..count()-1]
    `java.lang.ClassCastException` - In some implementations, the objects that are stored may be restricted to a particular type (such as String). (a RuntimeException)

### 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.