Package | com.yworks.graph.model |
Class | public class ConstantMapper |
Inheritance | ConstantMapper Object |
Implements | com.yworks.support.IMapper |
Method | Defined By | ||
---|---|---|---|
ConstantMapper(constantValue:Object = null)
Creates a new instance which always returns the given value. | ConstantMapper | ||
lookupValue(key:Object):Object
Always returns the constantValue passed to the constructor
or set with mapValue. | ConstantMapper | ||
mapValue(key:Object, value:Object):void
Changes the value to return for all keys. | ConstantMapper | ||
unMapValue(key:Object):void
Changes the value to return for all keys to null. | ConstantMapper |
ConstantMapper | () | Constructor |
public function ConstantMapper(constantValue:Object = null)
Creates a new instance which always returns the given value.
ParametersconstantValue:Object (default = null ) — The constant value to return for all queries.
|
lookupValue | () | method |
public function lookupValue(key:Object):Object
Always returns the constantValue passed to the constructor or set with mapValue.
Parameters
key:Object — The key to return the value for.
|
Object — value The constantValue to return.
|
mapValue | () | method |
public function mapValue(key:Object, value:Object):void
Changes the value to return for all keys.
Parameters
key:Object — Not used here.
| |
value:Object — The new constant value to return.
|
unMapValue | () | method |
public function unMapValue(key:Object):void
Changes the value to return for all keys to null
.
Parameters
key:Object — Not used here.
|