|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectit.unimi.di.mg4j.index.CompressionFlags
public class CompressionFlags
A container for constants and enums related to index compression.
Several MG4J index-related methods require a set of flags specified as a flag map,
that is, an EnumMap
from components to codings (see, e.g.,
BitStreamIndexWriter
). For the special component CompressionFlags.Component.PAYLOADS
, the only
admissible value is null
.
Besides declaring the necessary enums, this class contains a parsing method that turns an array of the form component:coding into a flag map.
Nested Class Summary | |
---|---|
static class |
CompressionFlags.Coding
A coding for an index component. |
static class |
CompressionFlags.Component
A component of the index. |
Field Summary | |
---|---|
static Map<CompressionFlags.Component,CompressionFlags.Coding> |
DEFAULT
Deprecated. As of MG4J 1.2, replaced by DEFAULT_STANDARD_INDEX . |
static Map<CompressionFlags.Component,CompressionFlags.Coding> |
DEFAULT_PAYLOAD_INDEX
An unmodifiable map representing the default flags for a payload-based index. |
static Map<CompressionFlags.Component,CompressionFlags.Coding> |
DEFAULT_QUASI_SUCCINCT_INDEX
An unmodifiable map representing the default flags for a quasi-succinct index. |
static Map<CompressionFlags.Component,CompressionFlags.Coding> |
DEFAULT_STANDARD_INDEX
An unmodifiable map representing the default flags for a standard index. |
static String |
NONE
A string used by valueOf(String[], Map) to disable a component. |
Constructor Summary | |
---|---|
CompressionFlags()
|
Method Summary | |
---|---|
static Map<CompressionFlags.Component,CompressionFlags.Coding> |
valueOf(String[] flag,
Map<CompressionFlags.Component,CompressionFlags.Coding> defaultMap)
Returns a flag map corresponding to a given array of strings. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String NONE
valueOf(String[], Map)
to disable a component.
public static final Map<CompressionFlags.Component,CompressionFlags.Coding> DEFAULT_STANDARD_INDEX
public static final Map<CompressionFlags.Component,CompressionFlags.Coding> DEFAULT_QUASI_SUCCINCT_INDEX
public static final Map<CompressionFlags.Component,CompressionFlags.Coding> DEFAULT_PAYLOAD_INDEX
@Deprecated public static final Map<CompressionFlags.Component,CompressionFlags.Coding> DEFAULT
DEFAULT_STANDARD_INDEX
.
Constructor Detail |
---|
public CompressionFlags()
Method Detail |
---|
public static Map<CompressionFlags.Component,CompressionFlags.Coding> valueOf(String[] flag, Map<CompressionFlags.Component,CompressionFlags.Coding> defaultMap)
This method takes an array of (possibly untrimmed) flag strings of the form component:coding and turns them into a flag map (see the introduction). The flag map can be initialised by an optional default map, and the special value NONE for coding may be used to delete a key (the corresponding key in the flag map will be missing).
It is acceptable that strings in the array have whitespace around.
flag
- an array of (possibly untrimmed) flag strings of
the form component:coding.defaultMap
- a optional flag map of default values, or null
.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |