|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.qi4j.io.Transforms
public class Transforms
Utility class for I/O transforms
Nested Class Summary | |
---|---|
static class |
Transforms.ByteBuffer2String
Convert ByteBuffers to Strings using the given CharSet |
static class |
Transforms.Counter<T>
Count the number of items in the transfer. |
static class |
Transforms.Log<T>
Log the toString() representation of transferred items to the given log. |
static class |
Transforms.ObjectToString
Convert objects to Strings using .toString() |
static class |
Transforms.ProgressLog<T>
Track progress of transfer by emitting a log message in given intervals. |
static class |
Transforms.String2Bytes
Convert strings to bytes using the given CharSet |
Constructor Summary | |
---|---|
Transforms()
|
Method Summary | ||
---|---|---|
static
|
filter(Specification<? super T> specification,
Output<T,ReceiverThrowableType> output)
Filter items in a transfer by applying the given Specification to each item. |
|
static
|
filteredMap(Specification<? super T> specification,
Function<? super T,? extends T> function,
Output<T,ReceiverThrowableType> output)
Apply the given function to items in the transfer that match the given specification. |
|
static
|
lock(java.util.concurrent.locks.Lock lock,
Input<T,SenderThrowableType> input)
Wrapper for Outputs that uses a lock whenever a transfer is instantiated. |
|
static
|
lock(java.util.concurrent.locks.Lock lock,
Output<T,ReceiverThrowableType> output)
Wrapper for Outputs that uses a lock whenever a transfer is instantiated. |
|
static
|
map(Function<? super From,? extends To> function,
Output<To,ReceiverThrowableType> output)
Map items in a transfer from one type to another by applying the given function. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Transforms()
Method Detail |
---|
public static <T,ReceiverThrowableType extends java.lang.Throwable> Output<T,ReceiverThrowableType> filter(Specification<? super T> specification, Output<T,ReceiverThrowableType> output)
T
- ReceiverThrowableType
- specification
- output
-
public static <From,To,ReceiverThrowableType extends java.lang.Throwable> Output<From,ReceiverThrowableType> map(Function<? super From,? extends To> function, Output<To,ReceiverThrowableType> output)
From
- To
- ReceiverThrowableType
- function
- output
-
public static <T,ReceiverThrowableType extends java.lang.Throwable> Output<T,ReceiverThrowableType> filteredMap(Specification<? super T> specification, Function<? super T,? extends T> function, Output<T,ReceiverThrowableType> output)
T
- ReceiverThrowableType
- specification
- function
- output
-
public static <T,ReceiverThrowableType extends java.lang.Throwable> Output<T,ReceiverThrowableType> lock(java.util.concurrent.locks.Lock lock, Output<T,ReceiverThrowableType> output)
T
- ReceiverThrowableType
- lock
- the lock to be used for transfersoutput
- output to be wrapped
public static <T,SenderThrowableType extends java.lang.Throwable> Input<T,SenderThrowableType> lock(java.util.concurrent.locks.Lock lock, Input<T,SenderThrowableType> input)
T
- SenderThrowableType
- lock
- the lock to be used for transfersinput
- input to be wrapped
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |