|
||||||||||
| PREV CLASS Documentation homepage NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectilog.cpl.util.IlpAbstractValueMap
ilog.cpl.util.IlpIndexedValueMap
public class IlpIndexedValueMap
This class models a simple value map implementation, which associates typed keys with typed values.
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| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface java.util.Map |
|---|
Map.Entry<K,V> |
| Constructor Summary | |
|---|---|
IlpIndexedValueMap()
Default constructor. |
|
| Method Summary | |
|---|---|
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. |
| Methods inherited from class ilog.cpl.util.IlpAbstractValueMap |
|---|
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 |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public IlpIndexedValueMap()
| Method Detail |
|---|
public void setKeys(Object[] k)
public void setKeys(int index,
Object key)
throws ArrayIndexOutOfBoundsException
index - Index of the key being set.key - Key value.
ArrayIndexOutOfBoundsExceptionpublic 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
|
||||||||||
| PREV CLASS Documentation homepage NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||