W3cubDocs

/Haxe

StringMap<T>

package haxe.ds

implements IMap<String, T>

@:headerClassCode("\n inline void set(String key, ::null value) { __string_hash_set(h,key,value); }\n inline void set(String key, bool value) { __string_hash_set(h,key,value); }\n inline void set(String key, char value) { __string_hash_set_int(h,key,value); }\n inline void set(String key, unsigned char value) { __string_hash_set_int(h,key,value); }\n inline void set(String key, signed char value) { __string_hash_set_int(h,key,value); }\n inline void set(String key, short value) { __string_hash_set_int(h,key,value); }\n inline void set(String key, unsigned short value) { __string_hash_set_int(h,key,value); }\n inline void set(String key, int value) { __string_hash_set_int(h,key,value); }\n inline void set(String key, unsigned int value) { __string_hash_set_int(h,key,value); }\n inline void set(String key, float value) { __string_hash_set_float(h,key,value); }\n inline void set(String key, double value) { __string_hash_set_float(h,key,value); }\n inline void set(String key, ::String value) { __string_hash_set_string(h,key,value); }\n\n template<typename V, typename H>\n inline void set(String key, const ::cpp::Struct<V,H> &value) {__string_hash_set(h,key,value); }\n template<typename V>\n inline void set(String key, const ::cpp::Function<V> &value) {__string_hash_set(h,key,(Dynamic)value ); }\n template<typename V>\n inline void set(String key, const ::cpp::Pointer<V> &value) {__string_hash_set(h,key,(Dynamic)value ); }\n\n template<typename VALUE>\n inline void set(Dynamic &key, const VALUE &value) { set( (String)key, value ); }\n")@:coreApi Available on all platforms

StringMap allows mapping of String keys to arbitrary values.

See Map for documentation details.

See:

Constructor

new ()

Creates a new StringMap.

Methods

@:has_untyped exists (key:String):Bool

See Map.exists

@:has_untyped get (key:String):Null<T>

See Map.get

@:has_untyped iterator ():Iterator<T>

Available on cpp, flash, hl, js, lua, macro, neko, php, python

See Map.iterator

iterator ():Iterator<T>

Available on cs, java

Returns an iterator of all values in the hashtable. Implementation detail: Do not set() any new value while iterating, as it may cause a resize, which will break iteration

keys ():Iterator<String>

Available on cs, java

Returns an iterator of all keys in the hashtable. Implementation detail: Do not set() any new value while iterating, as it may cause a resize, which will break iteration

@:has_untyped keys ():Iterator<String>

Available on cpp, flash, hl, js, lua, macro, neko, php, python

See Map.keys

@:has_untyped remove (key:String):Bool

See Map.remove

@:has_untyped set (key:String, value:T ):Void

See Map.set

toString ():String

Available on cs, java

Returns an displayable representation of the hashtable content.

@:has_untyped toString ():String

Available on cpp, flash, hl, js, lua, macro, neko, php, python

See Map.toString

© 2005–2018 Haxe Foundation
Licensed under a MIT license.
https://api.haxe.org/haxe/ds/StringMap.html