public interface Transformer
View
. For pure filtering, consider implementing a Filter
instead.View.viewTransformed
Modifier and Type | Method and Description |
---|---|
default byte[] |
inverseTransformKey(byte[] tkey)
Apply an inverse transformation of the given key, if supported.
|
default byte[] |
inverseTransformKeyGt(byte[] tkey)
Apply an inverse transformation of the given key, strictly greater than the one given.
|
default byte[] |
inverseTransformKeyLt(byte[] tkey)
Apply an inverse transformation of the given key, strictly less than the one given.
|
byte[] |
inverseTransformValue(byte[] tvalue,
byte[] key,
byte[] tkey)
Apply an inverse transformation of the given value, if supported.
|
default boolean |
requireValue()
Returns true by default, indicating that the transform methods always require a value
instance to be provided.
|
default Ordering |
transformedOrdering(Ordering original)
Returns the natural ordering of keys, after they have been transformed.
|
default byte[] |
transformKey(byte[] key,
byte[] value)
Transform or filter out the given key.
|
byte[] |
transformValue(byte[] value,
byte[] key,
byte[] tkey)
Transform or filter out the given value.
|
default boolean requireValue()
byte[] transformValue(byte[] value, byte[] key, byte[] tkey) throws IOException
value
- nullable value to transformkey
- non-null untransformed key associated with the valuetkey
- non-null transformed key associated with the valueIOException
byte[] inverseTransformValue(byte[] tvalue, byte[] key, byte[] tkey) throws ViewConstraintException, IOException
tvalue
- nullable value to transformkey
- non-null untransformed key associated with the valuetkey
- non-null transformed key associated with the valueViewConstraintException
- if inverse transformation of given value is not supportedIOException
default byte[] transformKey(byte[] key, byte[] value) throws IOException
key
- non-null key to transformvalue
- nullable value associated with the keyIOException
default byte[] inverseTransformKey(byte[] tkey)
tkey
- non-null keydefault byte[] inverseTransformKeyGt(byte[] tkey)
tkey
- non-null keydefault byte[] inverseTransformKeyLt(byte[] tkey)
tkey
- non-null keyCopyright © 2011–2017 Cojen. All rights reserved.