Class Queue.FixEnumImpl
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class Queue.FixEnumImpl

java.lang.Object
   |
   +----Queue.FixEnumImpl

public class FixEnumImpl
extends Object
implements Enumeration
Class FixEnumImpl implements the Enumeration interface given that the number of elements in an enumeration is known at enumeration construction time. The enumeration retrieval operations are synchronized for concurrent access.
See Also:
Enumeration

Variable Index

 o capacity
 o enum_array
 o read_index
 o write_index

Constructor Index

 o FixEnumImpl(int)
Constructor for class SynFixEnumImpl.

Method Index

 o hasMoreElements()
Method hasMoreElements() returns true if there are more values to be enumerated, and can be used to determine whether a loop should continue.
 o nextElement()
Method nextElement() will return the next element in the enumeration.

Variables

 o capacity
  protected int capacity
 o read_index
  protected int read_index
 o write_index
  protected int write_index
 o enum_array
  protected Object enum_array[]

Constructors

 o FixEnumImpl
  public FixEnumImpl(int total_num)
Constructor for class SynFixEnumImpl.
Parameters:
total_num - total number of elements in the enumeration

Methods

 o hasMoreElements
  public synchronized boolean hasMoreElements()
Method hasMoreElements() returns true if there are more values to be enumerated, and can be used to determine whether a loop should continue.
See Also:
hasMoreElements
 o nextElement
  public synchronized Object nextElement()
Method nextElement() will return the next element in the enumeration. If no more elements are available, the exception NoSuchElementException will be thrown.
Throws: NoSuchElementException
thrown when no more items available
See Also:
nextElement

All Packages  Class Hierarchy  This Package  Previous  Next  Index