Modifier and Type | Class and Description |
---|---|
static class |
BufferPipe.BoundedBufferPutException
Exception to throw if a
put throws an exception. |
static class |
BufferPipe.BoundedBufferTakeException
Exception to throw if a
take throws an exception. |
static class |
BufferPipe.Finished |
Constructor and Description |
---|
BufferPipe() |
Modifier and Type | Method and Description |
---|---|
void |
close()
Close the pipe.
|
void |
close(Exception e)
Close the pipe (see close()) and record
e as its termination
status. |
Domain |
get()
Answer the next element if there is one, otherwise throw a NoSuchElementException.
|
boolean |
hasNext()
Answer true iff there are more elements for
get() to get. |
void |
put(Domain d)
Put a domain element into the pipe for later extraction.
|
public void put(Domain d)
Pipe
public void close()
Pipe
false
, and
get
will throw an exception.public void close(Exception e)
Pipe
e
as its termination
status. Any get
from the pipe must then fail, throwing an
exception.public boolean hasNext()
Pipe
get()
to get. If
the pipe was closed with an exception, throw that exception.Copyright ? 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Hewlett-Packard Development Company, LP