Rule Execution Server API

ilog.rules.engine
Class IlrParameterMap

java.lang.Object
  extended by ilog.rules.engine.IlrParameterMap
All Implemented Interfaces:
Serializable

public class IlrParameterMap
extends Object
implements Serializable

Implements a structure for storing parameter values to set or get from ruleset variables. Each parameter is stored with its name and its value.

See Also:
IlrContext.setParameters(IlrParameterMap), IlrContext.getReturnValues(), IlrContext.execute(), IlrContext.execute(String name), IlrContext.executeTask(), Serialized Form

Constructor Summary
IlrParameterMap()
          Creates an empty IlrParameterMap.
 
Method Summary
 void clear()
          Clears the internal structure.
 boolean getBooleanValue(String name)
          Gets the boolean value of the parameter named "name".
 byte getByteValue(String name)
          Gets the byte value of the parameter named "name".
 char getCharValue(String name)
          Gets the char value of the parameter named "name".
 double getDoubleValue(String name)
          Gets the double value of the parameter named "name".
 float getFloatValue(String name)
          Gets the float value of the parameter named "name".
 int getIntValue(String name)
          Gets the integer value of the parameter named "name".
 long getLongValue(String name)
          Gets the long value of the parameter named "name".
 Object getObjectValue(String name)
          Gets the Object value of the parameter named "name".
 short getShortValue(String name)
          Gets the short value of the parameter named "name".
 String getStringValue(String name)
          Gets the String value of the parameter named "name".
 Set keySet()
          Returns a java.util.Set with all the keys contained in the structure.
 void setParameter(String name, boolean value)
          Store for the parameter "name" and its value "value".
 void setParameter(String name, byte value)
          Store for the parameter "name" and its value "value".
 void setParameter(String name, char value)
          Store for the parameter "name" and its value "value".
 void setParameter(String name, double value)
          Store for the parameter "name" and its value "value".
 void setParameter(String name, float value)
          Store for the parameter "name" and its value "value".
 void setParameter(String name, int value)
          Store for the parameter "name" and its value "value".
 void setParameter(String name, long value)
          Store for the parameter "name" and its value "value".
 void setParameter(String name, Object value)
          Store for the parameter "name" and its value "value".
 void setParameter(String name, short value)
          Store for the parameter "name" and its value "value".
 void setParameter(String name, String value)
          Store for the parameter "name" and its value "value".
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

IlrParameterMap

public IlrParameterMap()
Creates an empty IlrParameterMap.

Method Detail

keySet

public Set keySet()
Returns a java.util.Set with all the keys contained in the structure.

Returns:
The keys stored in the structure.

setParameter

public void setParameter(String name,
                         boolean value)
Store for the parameter "name" and its value "value".

Parameters:
name - The parameter name.
value - The value of the boolean parameter.

setParameter

public void setParameter(String name,
                         byte value)
Store for the parameter "name" and its value "value".

Parameters:
name - The parameter name.
value - The value of the byte parameter.

setParameter

public void setParameter(String name,
                         char value)
Store for the parameter "name" and its value "value".

Parameters:
name - The parameter name.
value - The value of the char parameter.

setParameter

public void setParameter(String name,
                         int value)
Store for the parameter "name" and its value "value".

Parameters:
name - The parameter name.
value - The value of the integer parameter.

setParameter

public void setParameter(String name,
                         float value)
Store for the parameter "name" and its value "value".

Parameters:
name - The parameter name.
value - The value of the float parameter.

setParameter

public void setParameter(String name,
                         double value)
Store for the parameter "name" and its value "value".

Parameters:
name - The parameter name.
value - The value of the double parameter.

setParameter

public void setParameter(String name,
                         short value)
Store for the parameter "name" and its value "value".

Parameters:
name - The parameter name.
value - The value of the short parameter.

setParameter

public void setParameter(String name,
                         long value)
Store for the parameter "name" and its value "value".

Parameters:
name - The parameter name.
value - The value of the long parameter.

setParameter

public void setParameter(String name,
                         Object value)
Store for the parameter "name" and its value "value".

Parameters:
name - The parameter name.
value - The value of the Object parameter.

setParameter

public void setParameter(String name,
                         String value)
Store for the parameter "name" and its value "value".

Parameters:
name - The parameter name.
value - The value of the String parameter.

getBooleanValue

public boolean getBooleanValue(String name)
Gets the boolean value of the parameter named "name". If the parameter is unknown, an IllegalArgumentException is thrown. If the parameter value is not a boolean, a ClassCastException is thrown.

Parameters:
name - The parameter name.
Returns:
The boolean value of the parameter.

getByteValue

public byte getByteValue(String name)
Gets the byte value of the parameter named "name". If the parameter is unknown, an IllegalArgumentException is thrown. If the parameter value is not a byte, a ClassCastException is thrown.

Parameters:
name - The parameter name.
Returns:
The byte value of the parameter.

getCharValue

public char getCharValue(String name)
Gets the char value of the parameter named "name". If the parameter is unknown, an IllegalArgumentException is thrown. If the parameter value is not a char, a ClassCastException is thrown.

Parameters:
name - The parameter name.
Returns:
The char value of the parameter.

getIntValue

public int getIntValue(String name)
Gets the integer value of the parameter named "name". If the parameter is unknown, an IllegalArgumentException is thrown. If the parameter value is not an integer, a ClassCastException is thrown.

Parameters:
name - The parameter name.
Returns:
The integer value of the parameter.

getFloatValue

public float getFloatValue(String name)
Gets the float value of the parameter named "name". If the parameter is unknown, an IllegalArgumentException is thrown. If the parameter value is not a float, a ClassCastException is thrown.

Parameters:
name - The parameter name.
Returns:
The float value of the parameter.

getDoubleValue

public double getDoubleValue(String name)
Gets the double value of the parameter named "name". If the parameter is unknown, an IllegalArgumentException is thrown. If the parameter value is not a double, a ClassCastException is thrown.

Parameters:
name - The parameter name.
Returns:
The double value of the parameter.

getShortValue

public short getShortValue(String name)
Gets the short value of the parameter named "name". If the parameter is unknown, an IllegalArgumentException is thrown. If the parameter value is not a short, a ClassCastException is thrown.

Parameters:
name - The parameter name.
Returns:
The short value of the parameter.

getLongValue

public long getLongValue(String name)
Gets the long value of the parameter named "name". If the parameter is unknown, an IllegalArgumentException is thrown. If the parameter value is not a long, a ClassCastException is thrown.

Parameters:
name - The parameter name.
Returns:
The long value of the parameter.

getObjectValue

public Object getObjectValue(String name)
Gets the Object value of the parameter named "name". If the parameter is unknown, an IllegalArgumentException is thrown.

Parameters:
name - The parameter name.
Returns:
The Object value of the parameter.

getStringValue

public String getStringValue(String name)
Gets the String value of the parameter named "name". If the parameter is unknown, an IllegalArgumentException is thrown. If the parameter value is not an String, a ClassCastException is thrown.

Parameters:
name - The parameter name.
Returns:
The String value of the parameter.

clear

public void clear()
Clears the internal structure.


toString

public String toString()
Overrides:
toString in class Object

Rule Execution Server API

© Copyright IBM Corp. 1987, 2013