Hardis - Séquence de feuilletage |
---|
Differences between "createSimpleHash" and "createSimpleMap":
- The Hash-type object returned by "createSimpleMap" cannot be used in "addToSimpleHash" and "removeFromSimpleHash" functions (which relate to a Hash object created by the "createSimpleHash" function),
- The Hash-type object returned by "createSimpleMap" does not support the built-in ?keys, ?values and ?size functions, unlike a Hash object returned by "createSimpleHash". The equivalent methods keySet, values and size need to be used for a Hash object returned by "createSimpleMap",
- The keys of a Hash object returned by "createSimpleMap" may be of any type, unlike a Hash object returned by "createSimpleHash" which has its alphanumeric-type keys,
- The <#list aHashObject as aKey, aValue>...</#list> directive (list of keys/values of a Hash object) can only be executed for a Hash object created by the "createSimpleHash" function. The <#list aHashObject.keySet() as aKey><#-- Get the value via the aHashObject.get(aKey) expression -->...</#list> equivalent needs to be used
...
Parameters
No parameter.
For example
Pas de format |
---|
<#assign aHashObj = hardisCore.createSimpleMap() />Size> Size of Hash object:${aHashObj.size()} <#-- The put Java method does not return a value so we have to return a empty default value for assign directive --><#assign> <#assign noUse = aHashObj.put("key1", "value1")!"" /><#assign> <#assign noUse = aHashObj.put(2, "value2")!"" /><#list> <#list aHashObj.keySet() as aKey>TheaKey> The key is ${aKey} and the associated value is ${aHashObj.get(aKey)} </#list> |
Hardis - Haut de page |
---|
↑ Top of page |
...