Interface IWritableIntegerArrayDictionary
- All Superinterfaces:
Cloneable,IClone<IIntegerArrayDictionary>,ICompressible,IDictionary<int[]>,IIntegerArrayDictionary,IMemoryMonitored,IPointList,ITable,IUnnamedColumnarTable,IWritableDictionary<int[]>,Serializable
- All Known Subinterfaces:
IFixedLengthIntegerArrayDictionary
- All Known Implementing Classes:
AFixedLengthIntegerArrayDictionary,BucketedIntegerArrayDictionary,ColumnarIntegerArrayDictionary,FixedLengthIntegerArrayDictionary,IntegerArrayDictionary,IntegerArrayDictionaryWithHash,IntegerArrayPermutationDictionary,TranslatedIntegerArrayDictionary
IIntegerArrayDictionary.- Author:
- ActiveViam
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.qfs.dic.IWritableDictionary
IWritableDictionary.IDoubleDictionary, IWritableDictionary.IFloatDictionary, IWritableDictionary.IIntegerDictionary, IWritableDictionary.ILongDictionary -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final longA flag indicating that the mapping has added a new element to this dictionary (seemapWithFlags(int[])).static final longA flag indicating that the mapping has not directly stored its input array without any copying.Fields inherited from interface com.qfs.dic.IDictionary
DEFAULT_INITIAL_CAPACITY, ID_GENERATOR -
Method Summary
Modifier and TypeMethodDescriptionclone()This method is very similar to the one used by Object except that it returns the real class.longmapAndHash(int[] point) Indexes a point in this dictionary and returns its associated address and hash value.default intmapFromCell(IReadableCell cell) Maps the value stored by a cell into this dictionary.longmapWithFlags(int[] array) Maps the given array into this dictionary.Methods inherited from interface com.qfs.memory.ICompressible
compress, compressMethods inherited from interface com.qfs.dic.IDictionary
getDictionaryId, getDoublePosition, getFirstElements, getFloatPosition, getIntPosition, getLongPosition, getOrder, getPosition, getSize, getType, isNullable, read, readDouble, readFloat, readInt, readLong, size, supportConcurrentReadsMethods inherited from interface com.qfs.dic.IIntegerArrayDictionary
copyIntoMethods inherited from interface com.qfs.monitoring.memory.IMemoryMonitored
getMemoryStatisticMethods inherited from interface com.qfs.dic.IPointList
equals, equals, equals, equals, getColumn, isNull, read, readBoolean, readCoordinate, readCoordinates, readDouble, readFloat, readHashCode, readInt, readLength, readLong, readPoint, size, transferCoordinates, transferCoordinatesMethods inherited from interface com.qfs.dic.IWritableDictionary
clear, destroy, map, mapDouble, mapFloat, mapInt, mapLong, supportConcurrentWrites
-
Field Details
-
NEW_MAPPING
static final long NEW_MAPPINGA flag indicating that the mapping has added a new element to this dictionary (seemapWithFlags(int[])).- See Also:
-
REUSABLE_INPUT
static final long REUSABLE_INPUTA flag indicating that the mapping has not directly stored its input array without any copying. The input array can therefore only be modified afterward if this flag is set. Otherwise, the caller cannot modify it. (seemapWithFlags(int[]))- See Also:
-
-
Method Details
-
clone
IWritableIntegerArrayDictionary clone()Description copied from interface:ICloneThis method is very similar to the one used by Object except that it returns the real class.- Specified by:
clonein interfaceIClone<IIntegerArrayDictionary>- Returns:
- a clone of the object
-
mapAndHash
long mapAndHash(int[] point) Indexes a point in this dictionary and returns its associated address and hash value.If the point already exists in the dictionary (with respect to the equals / hashCode contract), the dictionary is left unchanged and the position of the already existing version of this Object is returned. Otherwise, this point is inserted in this dictionary and the new position is returned.
The returned
longpacks 2 integers: the point's hash code and its address in the dictionary. The upper, most significant bits of thelong(that can be read usingBits.unpack1(long)) contain the hash value, while the lower, least significant bits (that can be read usingBits.unpack2(long)) contain the point's address.- Parameters:
point- The point to map- Returns:
- A
longpacking the hash value and the position of this point in the dictionary - See Also:
-
mapWithFlags
long mapWithFlags(int[] array) Maps the given array into this dictionary.The lower bits of the returned
long(as returned byBits.unpack2(long)) contain the position of this array in this dictionary, while the upper bits contain various flags.- Parameters:
array- The array to map.- Returns:
- A
longpacking the mapped position of the input array in the dictionary and various flags.
-
mapFromCell
Description copied from interface:IWritableDictionaryMaps the value stored by a cell into this dictionary.- Specified by:
mapFromCellin interfaceIWritableDictionary<int[]>- Parameters:
cell- cell containing the value to map- Returns:
- the dictionary position for the mapped value
-