ilog.cpl.util
Class IlpOrderedValueMap

java.lang.Object
  extended by ilog.cpl.util.IlpAbstractValueMap
      extended by ilog.cpl.util.IlpOrderedValueMap
All Implemented Interfaces:
IlpValueMap, Map

public class IlpOrderedValueMap
extends IlpAbstractValueMap

This class models a simple value map implementation that associates typed keys with typed values.

The keys and values set to this value map are subject to type conversion. This is performed with the default type converter or with a type converter that is defined through 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 can be used in CSS files.

     #perceivedSeveritySelectionBackgroundMap {
        class: 'ilog.cpl.util.IlpOrderedValueMap';
        keyClass: 'java.lang.Integer';
        valueClass: 'java.awt.Color';
        keys: "0,1,2,3,4,5";
        values: "null, #DBDBDB, #FFFF99, #FFCC66, #FF9999, #FF9999";
     }
 

As illustrated in the example above, IlpOrderedValueMap is created as a JavaBean with mandatory properties that define the key and value types. Keys and values are set using a syntax based on values separated by a comma. Each value is retrieved and converted to the destination type using the type converter registered in the value map.

Note: The comma-separated values are handled by this class as String values. They are then converted to the specific types using the type converter. Only values that can be converted with the type converter present in the instance can be recognized.

Compatibility Note: In JViews 8.0, this class was moved from ilog.cpl.service to ilog.cpl.util.

Since:
JViews 8.0
See Also:
IlpValueMapFunction

Nested Class Summary
 
Nested classes/interfaces inherited from interface java.util.Map
Map.Entry<K,V>
 
Constructor Summary
IlpOrderedValueMap()
          Default constructor.
 
Method Summary
 void setKeys(Object[] k)
          Sets the keys present in the value map.
 void setValues(Object[] k)
          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

IlpOrderedValueMap

public IlpOrderedValueMap()
Default constructor.

Method Detail

setKeys

public void setKeys(Object[] k)
Sets the keys present in the value map.


setValues

public void setValues(Object[] k)
Sets the values present in the value map.



Copyright © 1996-2007 ILOG S.A. All rights reserved.   Documentation homepage.   . All Rights Reserved.