public class IlpIndexedValueMap extends IlpAbstractValueMap
The keys and values set to this value map are subject to type conversion.
This is done using the default type converter or a type converter that is
defined using the method setTypeConverter
.
This class is to be used in CSS files to support property retrieval in value maps. The following example illustrates how this class is used in CSS files.
#perceivedSeverityBackgroundMap { class: 'ilog.cpl.util.IlpIndexedValueMap'; keyClass: 'java.lang.Integer'; valueClass: 'java.awt.Color'; keys[0]: 0; keys[1]: 1; keys[2]: 2; keys[3]: 3; keys[4]: 4; keys[5]: 5; values[0]: '@|blinkingcolor("green", "blue")'; values[1]: '@|blinkingcolor("red", "blue")'; values[2]: '@|blinkingcolor("yellow", "blue")'; values[3]: '@|blinkingcolor("white", "blue")'; values[4]: '@|blinkingcolor("black", "blue")'; values[5]: '@|blinkingcolor("pink", "blue")'; }
IlpIndexedValueMap
is created
as a JavaBean with mandatory properties that define the key and value types.
This class only differs from IlpOrderedValueMap
in the way
that its values and keys are declared. Whereas
IlpOrderedValueMap
supports only simple types that can be
written and converted from String to the specific type using the registered
type converter, IlpIndexedValueMap
allows you to create beans
using the CSS syntax, or to create instances through the CSS functions on a
per-entry basis. When declaring an IlpIndexedValueMap
in a CSS,
each entry must be specified, as illustrated above.
Compatibility Note: In JViews 8.0, this class was moved from
ilog.cpl.service
to ilog.cpl.util
.
IlpValueMapFunction
Constructor and Description |
---|
IlpIndexedValueMap()
Default constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
setKeys(int index,
Object key)
Sets in the value map a key at the given index.
|
void |
setKeys(Object[] k)
Sets the keys present in the value map.
|
void |
setValues(int index,
Object v)
Sets a value at the given index in this value map.
|
void |
setValues(Object[] v)
Sets the values present in the value map.
|
addValue, clear, containsKey, containsValue, entrySet, equals, get, getKeyClass, getKeys, getKeys, getTypeConverter, getValue, getValueClass, getValues, getValues, hashCode, isEmpty, keySet, put, putAll, remove, setKeyClass, setTypeConverter, setValueClass, size, values
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
compute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAll
public void setKeys(Object[] k)
public void setKeys(int index, Object key) throws ArrayIndexOutOfBoundsException
index
- Index of the key being set.key
- Key value.ArrayIndexOutOfBoundsException
public void setValues(Object[] v)
v
- Values to be set in this value map.public void setValues(int index, Object v) throws ArrayIndexOutOfBoundsException
index
- Index of the value being set.v
- Value.ArrayIndexOutOfBoundsException
© Copyright Rogue Wave Software, Inc. 1997, 2018. All Rights Reserved.