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
-
capacity
-
-
enum_array
-
-
read_index
-
-
write_index
-
-
FixEnumImpl(int)
- Constructor for class SynFixEnumImpl.
-
hasMoreElements()
- Method hasMoreElements() returns true if there are more
values to be enumerated, and can be used to determine whether
a loop should continue.
-
nextElement()
- Method nextElement() will return the next element in the
enumeration.
capacity
protected int capacity
read_index
protected int read_index
write_index
protected int write_index
enum_array
protected Object enum_array[]
FixEnumImpl
public FixEnumImpl(int total_num)
- Constructor for class SynFixEnumImpl.
- Parameters:
- total_num - total number of elements in the enumeration
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
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