|
JXTA | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.jxta.impl.util.DynamicEnumeration
public class DynamicEnumeration
A dynamic Enumeration
which allows items to added to the
enumeration while it is in use. This is mostly intended for use with
SequenceInputStream
. When used with SequenceInputStream
it is important to call close()
on the enumeration before calling
close()
on the stream. Failing to do so will cause the stream to
block as it tries to "drain" the enumeration.
Constructor Summary | |
---|---|
DynamicEnumeration()
Creates a new instance of DynamicEnumeration |
|
DynamicEnumeration(List initial)
Creates a new instance of DynamicEnumeration |
Method Summary | |
---|---|
void |
add(Object add)
Add another object to the enumeration. |
void |
close()
There will be no more objects added. |
boolean |
hasMoreElements()
If the Enumeration has not been closed we may have to block until we have a stream to return. |
Object |
nextElement()
If the Enumeration has not been closed we may have to block until we have a stream to return. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DynamicEnumeration()
public DynamicEnumeration(List initial)
Method Detail |
---|
public boolean hasMoreElements()
hasMoreElements
in interface Enumeration
public Object nextElement()
nextElement
in interface Enumeration
public void add(Object add)
public void close()
|
JXSE | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |