public class Filters extends Object
Modifier and Type | Method and Description |
---|---|
static <I,O> OobFilter<I,O> |
asOobFilter(Filter<I,O> filter)
|
static <V> Queue<V> |
createQueue()
Creates a new coalescing
Queue whose Queue.add(Object) method incorporates an element only if the
tail element is not the same (by reference equality). |
static <V> Queue<V> |
readOnlyQueue(Queue<V> backing)
|
static <T> void |
transfer(Queue<T> inputs,
Queue<T> outputs)
|
static <V> Queue<V> |
writeOnlyQueue(Queue<V> backing)
|
public static final <V> Queue<V> createQueue()
Queue
whose Queue.add(Object)
method incorporates an element only if the
tail element is not the same (by reference equality). This is an optimization that should be acceptable for the
purposes of filtering.V
- the value type.public static final <V> Queue<V> readOnlyQueue(Queue<V> backing)
V
- the value type.public static final <V> Queue<V> writeOnlyQueue(Queue<V> backing)
V
- the value type.