Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## bsh.collection
Class CollectionIterator

    java.lang.Object
      bsh.collection.CollectionIterator

All Implemented Interfaces:
  BshIterator

public class CollectionIterator
extends java.lang.Object
implements BshIterator

This is the implementation of: BshIterator - a dynamically loaded extension that supports the collections API supported by JDK1.2 and greater.

Author:
  Daniel Leuck, Pat Niemeyer

Constructor Summary
`CollectionIterator(java.lang.Object iterateOverMe)` Construct a basic CollectionIterator

Method Summary
`protected java.util.Iterator` | `createIterator(java.lang.Object iterateOverMe)` Create an iterator over the given object
`boolean` | `hasNext()` Returns true if and only if there are more objects available via the `next()` method
`java.lang.Object` | `next()` Fetch the next object in the iteration

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### CollectionIterator

    public CollectionIterator(java.lang.Object iterateOverMe)

  Construct a basic CollectionIterator

Throws:
  `java.lang.IllegalArgumentException` - If the argument is not a supported (i.e. iterable) type.
  `java.lang.NullPointerException` - If the argument is null

Method Detail

### createIterator

    protected java.util.Iterator createIterator(java.lang.Object iterateOverMe)

  Create an iterator over the given object

  Parameters:
    `iterateOverMe` - Object of type Iterator, Collection, or types supported by CollectionManager.BasicBshIterator
  Returns:
    an Iterator
  Throws:
    `java.lang.IllegalArgumentException` - If the argument is not a supported (i.e. iterable) type.
    `java.lang.NullPointerException` - If the argument is null

### next

    public java.lang.Object next()

  Fetch the next object in the iteration

  Specified by:
    `next` in interface `BshIterator`
  Returns:
    The next object

### hasNext

    public boolean hasNext()

  Returns true if and only if there are more objects available via the `next()` method

  Specified by:
    `hasNext` in interface `BshIterator`
  Returns:
    The next object

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD