|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.pega.pegarules.pub.runtime.ParameterPage
public class ParameterPage
The ParameterPage
class allows a collection of
String
-valued, named parameters to be shared easily and
automatically during processing. Parameter names are subject to the same
(character-set) limitations as ClipboardProperty
names. Values
may be specified directly or indirectly.
An indirect parameter identifies a scalar clipboard
ClipboardProperty
which holds the String
value of
the parameter. Resetting the value of the parameter will change the value
of the ClipboardProperty
associated with it.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface java.util.Map |
---|
java.util.Map.Entry<K,V> |
Field Summary | |
---|---|
static java.lang.String |
COPYRIGHT
|
static java.lang.String |
VERSION
|
Constructor Summary | |
---|---|
ParameterPage()
|
Method Summary | |
---|---|
void |
clear()
Removes all parameters from this instance. |
boolean |
containsKey(java.lang.Object aName)
Identifies whether the named parameter is defined in this instance. |
boolean |
containsValue(java.lang.Object aValue)
Identifies whether the specified value is associated with one or more parameter names in this instance. |
void |
copyParameter(java.lang.String aName,
java.lang.String aNewName)
|
ParameterPage |
copyValues()
Make a copy of this ParameterPage. |
void |
define(java.lang.String aName,
ClipboardProperty aProperty)
Establishes an indirect parameter, associating the specified ClipboardProperty instance with the specified name. |
void |
define(java.lang.String aName,
java.lang.Object aValue)
Establishes a direct parameter with the specified name and value. |
void |
define(java.lang.String aName,
java.lang.String aValue)
Establishes a direct parameter with the specified name and value. |
java.util.Set |
entrySet()
Returns a set view of the mappings contained in this instance. |
boolean |
equals(java.lang.Object aObject)
Compares the specified object with this instance for equality. |
java.lang.Object |
get(java.lang.Object aName)
Identifies the definition, if any, of the named parameter. |
com.pega.ibm.icu.math.BigDecimal |
getAsBigDecimal(java.lang.String aName)
Returns the value, if any, of the named parameter. |
boolean |
getAsBoolean(java.lang.String aName)
Identifies the value, if any, of the named parameter. |
java.util.Date |
getAsDate(java.lang.String aName)
Returns the value, if any, of the named parameter on the current ParameterPage . |
double |
getAsDouble(java.lang.String aName)
Identifies the value, if any, of the named parameter. |
int |
getAsInteger(java.lang.String aName)
Identifies the value, if any, of the named parameter. |
java.lang.Object |
getDefinition(java.lang.String aName)
Identifies the definition, if any, of the named parameter. |
java.lang.Object |
getObject(java.lang.String aName)
Identifies the value, if any, of the named parameter. |
java.lang.Object |
getParameterValue(java.lang.String aName)
Identifies the value, if any, of the named parameter. |
java.lang.String |
getString(java.lang.String aName)
Identifies the value, if any, of the named parameter. |
int |
hashCode()
Returns the hash code value for this instance, which will be the hashCode value of the underlying java.util.HashMap . |
boolean |
isDefined(java.lang.String aName)
Identifies whether the named parameter is defined in this instance. |
boolean |
isEmpty()
Inicates whether this map contains no name-value associations. |
java.util.Set |
keySet()
Returns a set view of the keys (names) contained in this instance. |
java.lang.Object |
put(java.lang.Object aName,
java.lang.Object aValue)
Associates the specified value with the specified name in this instance, provided that the name is a String instance. |
void |
putAll(java.util.Map aMap)
Copies all of the mappings from the specified map to this map. |
void |
putObject(java.lang.String aName,
java.lang.Object aValue)
Assigns the specified value to the named parameter. |
void |
putObject(java.lang.String aName,
java.lang.Object aValue,
boolean aSkipValidName)
Deprecated. Use putObject(String aName, Object aValue) instead |
void |
putParamValue(java.lang.String aName,
char aType,
com.pega.ibm.icu.math.BigDecimal aValue)
Assigns the specified value to the named parameter. |
void |
putParamValue(java.lang.String aName,
char aType,
boolean aValue)
Assigns the specified value to the named parameter. |
void |
putParamValue(java.lang.String aName,
char aType,
java.util.Date aValue)
Assigns the specified value to the named parameter. |
void |
putParamValue(java.lang.String aName,
char aType,
double aValue)
Assigns the specified value to the named parameter. |
void |
putParamValue(java.lang.String aName,
char aType,
int aValue)
Assigns the specified value to the named parameter. |
void |
putParamValue(java.lang.String aName,
char aType,
java.lang.Object aValue)
Assigns the specified value to the named parameter. |
void |
putParamValue(java.lang.String aName,
char aType,
java.lang.String aValue)
Assigns the specified value to the named parameter. |
void |
putParamValue(java.lang.String aName,
java.lang.String aValue)
Assigns the specified value to the named parameter. |
void |
putString(java.lang.String aName,
java.lang.String aValue)
Assigns the specified value to the named parameter. |
java.lang.Object |
remove(java.lang.Object aName)
Removes any association for this name from this instance. |
void |
remove(java.lang.String aName)
Removes the named parameter, if any, from this instance. |
int |
size()
Returns the number of name-value mappings in this instance. |
java.lang.String |
toString()
Returns a string representation of the key/value pairs in this StringMap object. |
static boolean |
validName(java.lang.String aName)
Check if a string would be a valid property name. |
java.util.Collection |
values()
Returns a collection view of the values contained in this instance. |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String COPYRIGHT
public static final java.lang.String VERSION
Constructor Detail |
---|
public ParameterPage()
Method Detail |
---|
public void clear()
clear
in interface java.util.Map
public boolean isDefined(java.lang.String aName)
aName
- parameter whose presence is to be tested
true
when this instance includes the named
parameterpublic void copyParameter(java.lang.String aName, java.lang.String aNewName)
public void define(java.lang.String aName, java.lang.String aValue)
putString
only when the
named parameter is previously defined as indirect: the definition
will be replaced, leaving unchanged the value of the
ClipboardProperty
that was associated with the parameter.
aName
- name of parameter to be definedaValue
- value to be assigned to the named parameter. An empty
String
will be used if the value is null
.
java.lang.IllegalArgumentException
- if the parameter name is not validpublic void define(java.lang.String aName, java.lang.Object aValue)
putObject
only when the
named parameter is previously defined as indirect: the definition
will be replaced, leaving unchanged the value of the
ClipboardProperty
that was associated with the parameter.
aName
- name of parameter to be definedaValue
- value to be assigned to the named parameter.
java.lang.IllegalArgumentException
- if the parameter name is not validpublic void define(java.lang.String aName, ClipboardProperty aProperty)
ClipboardProperty
instance with the specified name.
aName
- name of parameter to be definedaProperty
- scalar ClipboardProperty
instance that
holds the value of the named parameter
java.lang.IllegalArgumentException
- if the parameter name is not valid, or
if the specified ClipboardProperty
is not defined or
not a string or Java Objectpublic java.lang.Object getDefinition(java.lang.String aName)
aName
- parameter whose definition is to be returned
String
value of parameter defined as a direct stringClipboardProperty
instance associated with parameter
defined as indirectObject
value of parameter defined as a direct Java Objectnull
if this parameter is not definedpublic java.lang.String getString(java.lang.String aName)
getString
in interface StringMap
aName
- parameter whose value is to be returned
String
value associated with the named
parameter, or null
if this parameter is not definedpublic java.lang.Object getParameterValue(java.lang.String aName)
aName
- parameter whose value is to be returned
null
if this parameter is not definedpublic com.pega.ibm.icu.math.BigDecimal getAsBigDecimal(java.lang.String aName)
Use of PublicAPI.getParamAsBigDecimal is preferred.
aName
- parameter whose value is to be returned
BigDecimal.ZERO
if this
parameter is not defined
java.lang.NullPointerException
- if there is no current ParameterPage
public java.util.Date getAsDate(java.lang.String aName)
ParameterPage
.
aName
- parameter whose value is to be returned
Date(0)
if this
parameter is not defined
java.lang.NullPointerException
- if there is no current ParameterPage
public int getAsInteger(java.lang.String aName)
Use of PublicAPI.getParamAsInteger is preferred.
aName
- parameter whose value is to be returned
int
value associated with the named
parameter, or 0
if this parameter is not definedpublic double getAsDouble(java.lang.String aName)
Use of PublicAPI.getParamAsDouble is preferred.
aName
- parameter whose value is to be returned
double
value associated with the named
parameter, or 0
if this parameter is not definedpublic boolean getAsBoolean(java.lang.String aName)
Use of PublicAPI.getParamAsBoolean is preferred.
aName
- parameter whose value is to be returned
boolean
value associated with the named
parameter, or false
if this parameter is not definedpublic java.lang.Object getObject(java.lang.String aName)
aName
- parameter whose value is to be returned
Object
value associated with the named
parameter, or null
if this parameter is not definedpublic void putString(java.lang.String aName, java.lang.String aValue)
putString
in interface StringMap
aName
- parameter to receive the specified valueaValue
- value to be assigned to the named parameter. An empty
String
will be used if the value is null
.
java.lang.IllegalArgumentException
- if the parameter name is not valid
java.lang.NullPointerException
- if the parameter name is null
public void putObject(java.lang.String aName, java.lang.Object aValue)
aName
- parameter to receive the specified valueaValue
- value to be assigned to the named parameter.
java.lang.IllegalArgumentException
- if the parameter name is not valid
java.lang.NullPointerException
- if the parameter name is null
public void putObject(java.lang.String aName, java.lang.Object aValue, boolean aSkipValidName)
aName
- parameter to receive the specified valueaValue
- value to be assigned to the named parameter.aSkipValidName
- Avoid check of aName for valid characters
java.lang.IllegalArgumentException
- if the parameter name is not valid
java.lang.NullPointerException
- if the parameter name is null
public void putParamValue(java.lang.String aName, char aType, com.pega.ibm.icu.math.BigDecimal aValue)
aName
- parameter to receive the specified valueaType
- declared PropertyInfo type code for the parameteraValue
- value to be assigned to the named parameter.public void putParamValue(java.lang.String aName, char aType, boolean aValue)
aName
- parameter to receive the specified valueaType
- declared PropertyInfo type code for the parameteraValue
- value to be assigned to the named parameter.public void putParamValue(java.lang.String aName, char aType, java.util.Date aValue)
aName
- parameter to receive the specified valueaType
- declared PropertyInfo type code for the parameteraValue
- value to be assigned to the named parameter.public void putParamValue(java.lang.String aName, char aType, double aValue)
aName
- parameter to receive the specified valueaType
- declared PropertyInfo type code for the parameteraValue
- value to be assigned to the named parameter.public void putParamValue(java.lang.String aName, char aType, int aValue)
aName
- parameter to receive the specified valueaType
- declared PropertyInfo type code for the parameteraValue
- value to be assigned to the named parameter.public void putParamValue(java.lang.String aName, char aType, java.lang.Object aValue)
aName
- parameter to receive the specified valueaType
- declared PropertyInfo type code for the parameter (ignored)aValue
- value to be assigned to the named parameter.public void putParamValue(java.lang.String aName, char aType, java.lang.String aValue)
aName
- parameter to receive the specified valueaType
- declared PropertyInfo type code for the parameter (ignored)aValue
- value to be assigned to the named parameter. An empty
String
will be used if the value is null
.public void putParamValue(java.lang.String aName, java.lang.String aValue)
aName
- parameter to receive the specified valueaValue
- value to be assigned to the named parameter. An empty
String
will be used if the value is null
.
java.lang.IllegalArgumentException
- if the parameter name is not valid
java.lang.NullPointerException
- if the parameter name is null
public void remove(java.lang.String aName)
aName
- name to be removed from this instancepublic ParameterPage copyValues()
public boolean containsKey(java.lang.Object aName)
containsKey
in interface java.util.Map
aName
- parameter whose presence is to be tested
true
when this instance includes the named
parameterpublic boolean containsValue(java.lang.Object aValue)
containsValue
in interface java.util.Map
aValue
- value whose presence is to be tested
true
when this instance associates this value with
at least one namepublic java.util.Set entrySet()
entrySet
in interface java.util.Map
public boolean equals(java.lang.Object aObject)
equals
in interface java.util.Map
equals
in class java.lang.Object
aObject
-
true
when this instance is equial to the
specified objectpublic java.lang.Object get(java.lang.Object aName)
get
in interface java.util.Map
aName
- parameter whose definition is to be returned
String
value of parameter defined as directClipboardProperty
instance associated with parameter
defined as indirectnull
if this parameter is not definedgetDefinition(String)
public int hashCode()
java.util.HashMap
.
hashCode
in interface java.util.Map
hashCode
in class java.lang.Object
public boolean isEmpty()
isEmpty
in interface java.util.Map
true
when this instance contains no name-value
associationspublic java.util.Set keySet()
keySet
in interface java.util.Map
public java.lang.Object put(java.lang.Object aName, java.lang.Object aValue)
String
instance.
Any previous association for this name is replaced.
put
in interface java.util.Map
aName
- name with which the specified value is to be associatedaValue
- value to be assigned to the named parameter.
null
if there
was none
java.lang.ClassCastException
- if aName isn't a String
java.lang.IllegalArgumentException
- if the parameter name is not valid
java.lang.NullPointerException
- if the parameter name is null
public void putAll(java.util.Map aMap)
putAll
in interface java.util.Map
aMap
- the map to be copied
java.lang.UnsupportedOperationException
- if the map is not an instance of
ParameterPage
public java.lang.Object remove(java.lang.Object aName)
remove
in interface java.util.Map
aName
- name to be removed from this instance
null
if there
was nonepublic int size()
size
in interface java.util.Map
public static boolean validName(java.lang.String aName)
aName
- Potential property name.
true
if this is a valid property name, false
otherwise.public java.util.Collection values()
values
in interface java.util.Map
public java.lang.String toString()
StringMap
toString
in interface StringMap
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |