Package com.tangosol.util
Class MultiBinaryLongMap.LeftoverLongMapHolder.LeftoverMaskedBinaryLongMap
java.lang.Object
com.tangosol.util.MultiBinaryLongMap.MaskedBinaryLongMap
com.tangosol.util.MultiBinaryLongMap.LeftoverLongMapHolder.LeftoverMaskedBinaryLongMap
- All Implemented Interfaces:
BinaryLongMap
- Enclosing class:
MultiBinaryLongMap.LeftoverLongMapHolder
public class MultiBinaryLongMap.LeftoverLongMapHolder.LeftoverMaskedBinaryLongMap
extends MultiBinaryLongMap.MaskedBinaryLongMap
LeftoverMaskedBinaryLongMap is a MaskedBinaryLongMap implementation
that is backed by the leftover (upper 32) bits in "real" key-tree
itself.
-
Nested Class Summary
Nested classes/interfaces inherited from class com.tangosol.util.MultiBinaryLongMap.MaskedBinaryLongMap
MultiBinaryLongMap.MaskedBinaryLongMap.MaskedEntry, MultiBinaryLongMap.MaskedBinaryLongMap.MaskedEntryVisitorNested classes/interfaces inherited from interface com.tangosol.util.BinaryLongMap
BinaryLongMap.Entry, BinaryLongMap.EntryVisitor, BinaryLongMap.SimpleMapImpl -
Field Summary
-
Constructor Summary
ConstructorsConstructorDescriptionLeftoverMaskedBinaryLongMap(MultiBinaryLongMap.MaskedLongMapHolder holder, BinaryLongMap blm, int cShift, int cBits) Construct a LeftoverMaskedBinaryLongMap. -
Method Summary
Modifier and TypeMethodDescriptionprotected longencode(long lEncoded, long lValue) Encode the specified n-bit value into the possibly already encoded value, preserving any unrelated bits.instantiateMaskedEntryVisitor(BinaryLongMap.EntryVisitor visitor, boolean fExisting) Instantiate a MaskedEntryVisitor to use toMultiBinaryLongMap.MaskedBinaryLongMap.visit(com.tangosol.util.Binary, com.tangosol.util.BinaryLongMap.EntryVisitor)entries in this MaskedBinaryLongMap.
-
Constructor Details
-
LeftoverMaskedBinaryLongMap
public LeftoverMaskedBinaryLongMap(MultiBinaryLongMap.MaskedLongMapHolder holder, BinaryLongMap blm, int cShift, int cBits) Construct a LeftoverMaskedBinaryLongMap.- Parameters:
holder- the MaskedLongMapHolderblm- the underlying BinaryLongMapcShift- the number of positions to left-shift the values stored in this MaskedBinaryLongMapcBits- the number of bits in the values stored in this MaskedBinaryLongMap
-
-
Method Details
-
encode
protected long encode(long lEncoded, long lValue) Encode the specified n-bit value into the possibly already encoded value, preserving any unrelated bits.- Overrides:
encodein classMultiBinaryLongMap.MaskedBinaryLongMap- Parameters:
lEncoded- the 64-bit value to encode intolValue- the value to encode- Returns:
- the new encoded value
-
instantiateMaskedEntryVisitor
protected MultiBinaryLongMap.MaskedBinaryLongMap.MaskedEntryVisitor instantiateMaskedEntryVisitor(BinaryLongMap.EntryVisitor visitor, boolean fExisting) Instantiate a MaskedEntryVisitor to use toMultiBinaryLongMap.MaskedBinaryLongMap.visit(com.tangosol.util.Binary, com.tangosol.util.BinaryLongMap.EntryVisitor)entries in this MaskedBinaryLongMap.- Overrides:
instantiateMaskedEntryVisitorin classMultiBinaryLongMap.MaskedBinaryLongMap- Parameters:
visitor- the underlying visitor to wrapfExisting- true iff the underlying visitor is to visit only entries that logically exist in the MaskedBinaryLongMap- Returns:
- a MaskedEntryVisitor
-