public class TransformationStrategies extends Object
TransformationStrategy
Constructor and Description |
---|
TransformationStrategies() |
Modifier and Type | Method and Description |
---|---|
static <T extends BitVector> |
identity()
A trivial transformation for data already in
BitVector form. |
static <T extends CharSequence> |
iso()
A trivial transformation from strings to bit vectors that concatenates the lower eight bits of the UTF-16 representation.
|
static <T extends BitVector> |
prefixFree()
A transformation from bit vectors to bit vectors that guarantees that its results are prefix free.
|
static <T extends CharSequence> |
prefixFreeIso()
A trivial transformation from strings to bit vectors that concatenates the bits of the UTF-16 representation and completes
the representation with an ASCII NUL to guarantee lexicographical ordering and prefix-freeness.
|
static <T extends CharSequence> |
prefixFreeUtf16()
A trivial transformation from strings to bit vectors that concatenates the bits of the UTF-16 representation and completes
the representation with an ASCII NUL to guarantee lexicographical ordering and prefix-freeness.
|
static <T extends CharSequence> |
utf16()
A trivial transformation from strings to bit vectors that concatenates the bits of the UTF-16 representation.
|
static <T> Iterable<BitVector> |
wrap(Iterable<T> iterable,
TransformationStrategy<? super T> transformationStrategy)
Wraps a given iterable, returning an iterable that contains bit vectors.
|
static <T> Iterator<BitVector> |
wrap(Iterator<T> iterator,
TransformationStrategy<? super T> transformationStrategy)
Wraps a given iterator, returning an iterator that emits bit vectors.
|
static <T> List<BitVector> |
wrap(List<T> list,
TransformationStrategy<? super T> transformationStrategy)
Wraps a given list, returning a list that contains bit vectors.
|
public static <T extends BitVector> TransformationStrategy<T> identity()
BitVector
form.public static <T extends CharSequence> TransformationStrategy<T> utf16()
public static <T extends CharSequence> TransformationStrategy<T> prefixFreeUtf16()
Note that strings provided to this strategy must not contain ASCII NULs. Warning: bit vectors returned by this strategy are adaptors around the original string. If the string changes while the bit vector is being accessed, the results will be unpredictable.
public static <T extends CharSequence> TransformationStrategy<T> iso()
Note that this transformation is sensible only for strings that are known to be contain just characters in the ISO-8859-1 charset. Warning: bit vectors returned by this strategy are adaptors around the original string. If the string changes while the bit vector is being accessed, the results will be unpredictable.
public static <T extends CharSequence> TransformationStrategy<T> prefixFreeIso()
Note that this transformation is sensible only for strings that are known to be contain just characters in the ISO-8859-1 charset, and that strings provided to this strategy must not contain ASCII NULs. Warning: bit vectors returned by this strategy are adaptors around the original string. If the string changes while the bit vector is being accessed, the results will be unpredictable.
public static <T> Iterator<BitVector> wrap(Iterator<T> iterator, TransformationStrategy<? super T> transformationStrategy)
iterator
- an iterator.transformationStrategy
- a strategy to transform the object returned by iterator
.iterator
passed through transformationStrategy
.public static <T> Iterable<BitVector> wrap(Iterable<T> iterable, TransformationStrategy<? super T> transformationStrategy)
iterable
- an iterable.transformationStrategy
- a strategy to transform the object contained in iterable
.iterable
passed through transformationStrategy
.public static <T> List<BitVector> wrap(List<T> list, TransformationStrategy<? super T> transformationStrategy)
list
- a list.transformationStrategy
- a strategy to transform the object contained in list
.list
passed through transformationStrategy
.public static <T extends BitVector> TransformationStrategy<T> prefixFree()
More in detail, we map 0 to 10, 1 to 11, and we add a 0 at the end of all strings.
Warning: bit vectors returned by this strategy are adaptors around the original string. If the string changes while the bit vector is being accessed, the results will be unpredictable.
Copyright © 2006–2019 SYSTAP, LLC DBA Blazegraph. All rights reserved.