|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.crsh.command.pipeline.AbstractPipe<C,P,CONS>
org.crsh.command.pipeline.ConvertingPipe<C,P,CONS>
public class ConvertingPipe<C,P,CONS extends CommandContext<? super P>>
| Field Summary | |
|---|---|
private Class<C> |
consumedType
. |
private Class<P> |
producedType
. |
| Fields inherited from class org.crsh.command.pipeline.AbstractPipe |
|---|
consumer, piped |
| Constructor Summary | |
|---|---|
ConvertingPipe(Class<C> consumedType,
Class<P> producedType,
boolean piped)
|
|
| Method Summary | |
|---|---|
Class<C> |
getConsumedType()
Returns the class of the element generic type. |
Class<P> |
getProducedType()
Returns the class of the produced type. |
void |
provide(C element)
Provide an element. |
void |
write(Chunk chunk)
Write a chunk to the screen. |
| Methods inherited from class org.crsh.command.pipeline.AbstractPipe |
|---|
close, flush, getAttributes, getHeight, getProperty, getSession, getWidth, isPiped, open, readLine, releaseAlternateBuffer, takeAlternateBuffer |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private final Class<C> consumedType
private final Class<P> producedType
| Constructor Detail |
|---|
public ConvertingPipe(Class<C> consumedType,
Class<P> producedType,
boolean piped)
| Method Detail |
|---|
public Class<C> getConsumedType()
Consumer
public Class<P> getProducedType()
Producer
public void write(Chunk chunk)
throws IOException
ScreenContext
chunk - the chunk
IOException - any io exception
public void provide(C element)
throws IOException
Consumer
element - the provided element
IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||