StringMap
StringMap allows mapping of String keys to arbitrary values.
See Map
for documentation details.
Instance Members
See Map.set
Name | Type |
---|---|
key |
String |
value |
haxe.ds.StringMap.T |
See Map.get
Name | Type |
---|---|
key |
String |
Returns |
---|
Null<haxe.ds.StringMap.T> |
See Map.exists
Name | Type |
---|---|
key |
String |
Returns |
---|
Bool |
See Map.remove
Name | Type |
---|---|
key |
String |
Returns |
---|
Bool |
keys(): Iterator
See Map.keys
(cs, java) Implementation detail: Do not set()
any new value while
iterating, as it may cause a resize, which will break iteration.
Returns |
---|
Iterator |
iterator(): Iterator
See Map.iterator
(cs, java) Implementation detail: Do not set()
any new value while
iterating, as it may cause a resize, which will break iteration.
Returns |
---|
Iterator |
keyValueIterator(): KeyValueIterator
See Map.keyValueIterator
Returns |
---|
KeyValueIterator |
clear(): Void
See Map.clear
new(): Void
Creates a new StringMap.
Private Members
HASH_UPPER: Float
FLAG_EMPTY: Int
FLAG_DEL: Int
This is the most important structure here and the reason why it's so fast. It's an array of all the hashes contained in the table. These hashes cannot be 0 nor 1, which stand for "empty" and "deleted" states.
The lookup algorithm will keep looking until a 0 or the key wanted is found; The insertion algorithm will do the same but will also break when FLAG_DEL is found;
vals: cs.NativeArray<haxe.ds.StringMap.T>
nBuckets: Int
size: Int
nOccupied: Int
upperBound: Int
cachedKey: String
cachedIndex: Int
Name | Type |
---|---|
x |
Int |
Returns |
---|
Int |
isEither(v: haxe.ds._StringMap.HashType): Bool
Name | Type |
---|---|
v |
haxe.ds._StringMap.HashType |
Returns |
---|
Bool |
isEmpty(v: haxe.ds._StringMap.HashType): Bool
Name | Type |
---|---|
v |
haxe.ds._StringMap.HashType |
Returns |
---|
Bool |
isDel(v: haxe.ds._StringMap.HashType): Bool
Name | Type |
---|---|
v |
haxe.ds._StringMap.HashType |
Returns |
---|
Bool |
hash(s: String): haxe.ds._StringMap.HashType
Name | Type |
---|---|
s |
String |
Returns |
---|
haxe.ds._StringMap.HashType |
arrayCopy(sourceArray: cs.system.Array, sourceIndex: Int, destinationArray: cs.system.Array, destinationIndex: Int, length: Int): Void
Name | Type |
---|---|
sourceArray |
cs.system.Array |
sourceIndex |
Int |
destinationArray |
cs.system.Array |
destinationIndex |
Int |
length |
Int |
Name | Type |
---|---|
x |
Bool |
Name | Type |
---|---|
key |
String |
Returns |
---|
Int |
Name | Type |
---|---|
newNBuckets |
Int |
Metadata
Name | Parameters |
---|---|
:hxGen |
- |