jaggregate
Interface PuttableStream<E>

Type Parameters:
E - the type of elements in the stream
All Known Implementing Classes:
WriteStream

public interface PuttableStream<E>

Provides protocol for a stream that allows objects to be added to its past sequence values.

Version:
$Id: PuttableStream.java,v 1.3 2008/05/05 00:57:13 pholser Exp $
Author:
Paul Holser

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.
 

Method Detail

nextPut

void nextPut(E newElement)
Writes the given new element to this stream.

Appends newElement to the past sequence values. If the future sequence values is not empty, removes its first object.

Parameters:
newElement - the element to add
Throws:
NoSuchElementException - if there is no next element to replace

nextPutAll

void nextPutAll(Collection<? extends E> newElements)
Enumerates the given collection, adding each new element to this stream.

This message has the effect of enumerating newElements with forEachDo and adding each element to this stream with nextPut.

Parameters:
newElements - the elements to add
Throws:
NullPointerException - if newElements is null
NoSuchElementException - if the put overruns the number of elements in the stream


© Copyright 2004-2008 Paul R. Holser, Jr. All rights reserved. Licensed under the Academic Free License version 3.0. pholser@alumni.rice.edu