|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object jaggregate.CollectionStream<E,Sequence<E>> jaggregate.WriteStream<E>
E
- a restriction on the types of elements being streamed overpublic class WriteStream<E>
Represents a stream that has a positionable sequence of values to which new values may be written. The initial sequence values are provided by a sequenced collection that serves as the stream backing store.
Constructor Summary | |
---|---|
WriteStream(Sequence<E> backingStore)
Creates a new stream over the given backing sequence. |
Method Summary | ||
---|---|---|
void |
nextPut(E newElement)
Writes the given new element to this stream. |
|
void |
nextPutAll(Collection<? extends E> newElements)
Enumerates the given collection, adding each new element to this stream. |
|
static
|
writeStreamOver(Sequence<T> backingStore)
Creates a new stream over the given backing sequence. |
Methods inherited from class jaggregate.CollectionStream |
---|
atEnd, close, contents, isEmpty, position, position, reset, setToEnd |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public WriteStream(Sequence<E> backingStore)
backingStore
- the backing sequence to stream over
NullPointerException
- if backingStore
is null
Method Detail |
---|
public static <T> WriteStream<T> writeStreamOver(Sequence<T> backingStore)
T
- the type of elements in the backing sequencebackingStore
- the backing sequence to stream over
NullPointerException
- if backingStore
is null
public void nextPut(E newElement)
newElement
to the past sequence values. If the future sequence
values is not empty, removes its first object.
nextPut
in interface PuttableStream<E>
newElement
- the element to addpublic void nextPutAll(Collection<? extends E> newElements)
newElements
with
forEachDo
and adding each element to
this stream with nextPut
.
nextPutAll
in interface PuttableStream<E>
newElements
- the elements to add
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |