|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.fortytwo.flow.Switch<T>
T - the type of data being passedpublic class Switch<T>
A modal pipeline which passes data alternately to one of two downstream sinks
| Constructor Summary | |
|---|---|
Switch(Sink<T> left,
Sink<T> right)
Constructs a new switch over the given sinks |
|
| Method Summary | |
|---|---|
void |
flip()
Toggles between the two downstream sinks. |
void |
put(T t)
Receives the next data item and passes it to the appropriate downstream sink. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Switch(Sink<T> left,
Sink<T> right)
left - one of two downstream sinksright - the other of two downstream sinks| Method Detail |
|---|
public void put(T t)
throws RippleException
put in interface Sink<T>t - the data item being passed
RippleException - if a data handling error occurspublic void flip()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||