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.util
Interface IndexedGetInterface

All Superinterfaces:
  com.sas.util.Countable

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

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

    public interface IndexedGetInterface

extends com.sas.util.Countable

`IndexedGetInterface` is an interface which defines a `get(int index)` method, commonly used for retrieving objects from indexed collections. Note that some objects may implement `IndexedGetInterface` but may chose not to implement ``IndexedSetInterface``.

The object must also implement the ``Countable`` interface which defines the valid range of indices. Most objects use zero based indexing and thus the valid set of indices would be `0..count()-1`.

## Usage

     for (int i = 0, count = x.count(); i < count; i++) {
        Object o = x.get(i);
        // operate on o
     }

See Also:
  `Countable`, `StaticOrderedCollectionInterface`, `IndexedSetInterface`

Method Summary
`abstract java.lang.Object` | `get(int index)` Get a value via an integer index.

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

Method Detail

### get

    java.lang.Object get(int index)

  Get a value via an integer index. This is like an array reference.

  Parameters:
    `index` - the index of the item to fetch.
  Returns:
    Object the object associated with the index.
  Throws:
    `java.lang.IndexOutOfBoundsException` - The implementor of this interface may throw this RuntimeException if the index is not valid.

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.