public interface SymbolStriper
Stripes do not intersect, each stripe has a filter
that represents it.
Striper should split all symbols into more than one stripe (with the exception of
MonoStriper
which does no splitting being essentially the "identity" striper).
Modifier and Type | Method and Description |
---|---|
static SymbolStriper |
definedValueOf(DataScheme scheme,
String spec)
Creates
SymbolStriper from the given specification for the given scheme, or throws exception. |
default BitSet |
getIntersectingStripes(QDFilter filter)
Returns bit set of
getStripeCount() size that specifies stripes that
intersect with the given filter. |
String |
getName()
Returns a string representation of this striper.
|
DataScheme |
getScheme()
Returns scheme that this striper works for.
|
int |
getStripeCount()
Returns the positive number of stripes that this striper splits into.
|
QDFilter |
getStripeFilter(int stripeIndex)
Returns
filter corresponding for the given stripe index. |
default int |
getStripeIndex(char[] symbol,
int offset,
int length)
Returns the index of the stripe that the given symbol (represented as character array) falls into.
|
int |
getStripeIndex(int cipher,
String symbol)
Returns the index of the stripe that the given cipher-symbol pair falls into.
|
default int |
getStripeIndex(String symbol)
Returns the index of the stripe that the given symbol falls into.
|
String |
toString()
Returns a string representation of this striper.
|
static SymbolStriper |
valueOf(DataScheme scheme,
String spec)
Creates
SymbolStriper from the given specification for the given scheme,
or null if specification is unknown. |
String getName()
SymbolStriperFactory
.String toString()
DataScheme getScheme()
null
if this striper works for any scheme.int getStripeCount()
int getStripeIndex(int cipher, String symbol)
Note that wildcard
symbol should not be submitted to this method,
since it should be accepted by all stripes therefore making stripes intersecting each other.
cipher
- symbol ciphersymbol
- symbol stringQDFilter.accept(QDContract, DataRecord, int, String)
default int getStripeIndex(String symbol)
symbol
- symbol string (not-null)getStripeIndex(int, String)
default int getStripeIndex(char[] symbol, int offset, int length)
symbol
- array that is the source of the symboloffset
- the initial offsetlength
- the symbol's lengthgetStripeIndex(int, String)
QDFilter getStripeFilter(int stripeIndex)
filter
corresponding for the given stripe index.stripeIndex
- stripe indexdefault BitSet getIntersectingStripes(QDFilter filter)
getStripeCount()
size that specifies stripes that
intersect with the given filter. If intersection cannot be calculated null
can be returned.filter
- QD filter to check for intersectiongetStripeCount()
size of intersecting stripes, or null
.static SymbolStriper valueOf(DataScheme scheme, String spec)
SymbolStriper
from the given specification for the given scheme,
or null
if specification is unknown.scheme
- data schemespec
- striper specificationnull
if specification is unknownFilterSyntaxException
- if spec is invalid.static SymbolStriper definedValueOf(DataScheme scheme, String spec)
SymbolStriper
from the given specification for the given scheme, or throws exception.scheme
- data schemespec
- striper specificationFilterSyntaxException
- if spec is invalid or unknownCopyright © 2002–2025 Devexperts LLC. All rights reserved.