Top Description Inners Fields Constructors Methods
bsh

public Class CollectionManager

extends Object
Class Inheritance
Known Direct Subclasses
bsh.collection.CollectionManagerImpl
Imports
java.util.Enumeration, .Vector, .Hashtable, java.lang.reflect.Array

The default CollectionManager (which remains Java 1.1 compatible) supports iteration over objects of type: Enumeration, Vector, String, StringBuffer and array. The dynamically loaded CollectionManagerImpl supports additional types when it is present.
See Also
BshIterable.java

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class
CollectionManager.BasicBshIterator

An implementation that works with JDK 1.1

Field Summary

Modifier and TypeField and Description
private static CollectionManager

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public BshIterator
public static synchronized CollectionManager
public Object
public boolean
public boolean
public Object
putInMap(Object map, Object key, Object value)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

managerback to summary
private static CollectionManager manager

Constructor Detail

CollectionManagerback to summary
public CollectionManager()

Method Detail

getBshIteratorback to summary
public BshIterator getBshIterator(Object obj) throws IllegalArgumentException
getCollectionManagerback to summary
public static synchronized CollectionManager getCollectionManager()
getFromMapback to summary
public Object getFromMap(Object map, Object key)
isBshIterableback to summary
public boolean isBshIterable(Object obj)
isMapback to summary
public boolean isMap(Object obj)
putInMapback to summary
public Object putInMap(Object map, Object key, Object value)
bsh back to summary

public Class CollectionManager.BasicBshIterator

extends Object
implements BshIterator
Class Inheritance
All Implemented Interfaces
bsh.BshIterator

An implementation that works with JDK 1.1

Field Summary

Modifier and TypeField and Description
pack-priv Enumeration<E>

Constructor Summary

AccessConstructor and Description
public
BasicBshIterator(Object
object over which we are iterating
iterateOverMe
)

Construct a basic BasicBshIterator

Method Summary

Modifier and TypeMethod and Description
protected Enumeration<E>

Returns:

an enumeration
createEnumeration
(Object
Object of type Enumeration, Vector, String, StringBuffer or an array
iterateOverMe
)

Create an enumeration over the given object

public boolean

Returns:

The next object
hasNext
()

Implements bsh.BshIterator.hasNext.

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

Returns:

The next object
next
()

Implements bsh.BshIterator.next.

Fetch the next object in the iteration
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

enumerationback to summary
pack-priv Enumeration<E> enumeration

Constructor Detail

BasicBshIteratorback to summary
public BasicBshIterator(Object iterateOverMe)

Construct a basic BasicBshIterator

Parameters
iterateOverMe:Object

object over which we are iterating

Exceptions
IllegalArgumentException:
If the argument is not a supported (i.e. iterable) type.
NullPointerException:
If the argument is null

Method Detail

createEnumerationback to summary
protected Enumeration<E> createEnumeration(Object iterateOverMe)

Create an enumeration over the given object

Parameters
iterateOverMe:Object

Object of type Enumeration, Vector, String, StringBuffer or an array

Returns:Enumeration<E>

an enumeration

Exceptions
IllegalArgumentException:
If the argument is not a supported (i.e. iterable) type.
NullPointerException:
If the argument is null
hasNextback to summary
public boolean hasNext()

Implements bsh.BshIterator.hasNext.

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

Returns:boolean

The next object

nextback to summary
public Object next()

Implements bsh.BshIterator.next.

Fetch the next object in the iteration

Returns:Object

The next object