Generic string->value map that is stored in a given block.
This class is described in detail in Generic Containers article.
new (s:ServerClass, b:Block, a:String)
Creates a new generic key-value map on top of cache block.
Parameters:
s
Slave server.
b
Cache block.
a
Block attribute name.
inline decrease (key:String, ?value:Int):Void
Decreases Int
value by a given amount.
Parameters:
key
Map key.
value
Amount to decrease by.
value
Amount to decrease by. Defaults to 1.
Returns map value as Int
.
Parameters:
key
Map key.
Returns:
Map value. Returns 0, if this mapping is not found.
getDynamic (key:String):Dynamic
Returns map value as Dynamic
.
Parameters:
key
Map key.
Returns:
Map value. Returns null, if this mapping is not found.
Returns map value as Float
.
Parameters:
key
Map key.
Returns:
Map value. Returns 0, if this mapping is not found.
inline increase (key:String, ?value:Int):Void
Increases Int
value by a given amount.
Parameters:
key
Map key.
value
Amount to increase by. Defaults to 1.
set (key:String, val:Dynamic):Void
Maps key to a given value.
If the new value equals the old one, nothing happens.
If the new value is 0, the mapping will be deleted.
Will call the setPre()
and setPost()
hooks.
Parameters:
key
Map key.
val
New value.