Class ReversibleCache
java.lang.Object
com.illumon.util.datastructures.cache.BaseOffsetLookupCache<VALUE_TYPE,EXTRA_INPUT_TYPE>
com.illumon.util.datastructures.cache.ArrayBackedOffsetLookupCache<String,ChunkSource.FillContext>
com.illumon.iris.db.v2.sources.regioned.cache.ReversibleCache
- All Implemented Interfaces:
StringSetImpl.ReversibleLookup<String>
,OffsetLookupCache<String,
ChunkSource.FillContext>
public class ReversibleCache
extends ArrayBackedOffsetLookupCache<String,ChunkSource.FillContext>
implements StringSetImpl.ReversibleLookup<String>
An
ArrayBackedOffsetLookupCache
that allows for forward and backwards lookups of values.-
Constructor Summary
ConstructorsConstructorDescriptionReversibleCache
(OffsetLookup<String, ChunkSource.FillContext> lookupFunction, FillContextMaker fillContextMaker) -
Method Summary
Methods inherited from class com.illumon.util.datastructures.cache.ArrayBackedOffsetLookupCache
clear, get
-
Constructor Details
-
ReversibleCache
public ReversibleCache(@NotNull OffsetLookup<String, ChunkSource.FillContext> lookupFunction, @NotNull FillContextMaker fillContextMaker)
-
-
Method Details
-
get
Description copied from interface:StringSetImpl.ReversibleLookup
Forward lookup from the integral index.- Specified by:
get
in interfaceStringSetImpl.ReversibleLookup<String>
- Returns:
- the DATA_TYPE associated with the index.
-
rget
Description copied from interface:StringSetImpl.ReversibleLookup
Reverse lookup of the DATA_TYPE.- Specified by:
rget
in interfaceStringSetImpl.ReversibleLookup<String>
- Returns:
- the integral index associated with the DATA_TYPE.
-