getValueAsNumeric
getValueAsNumeric()

The getValueAsNumeric method returns the value of a NameValuePair object.

You should use getValueDataType before using getValueAsNumeric to confirm you are referencing the correct data type.

Return value

The getValueAsNumeric method returns a double. If, for example, you are retrieving a value originally stored in your profile table as an Integer, getValueAsNumeric returns a double.

Example

The following example is an excerpt from a method which processes a NameValuePair and prints the value if it is numeric.

if(nvp.getValueDataType().equals(NameValuePair.DATA_TYPE_NUMERIC))
{
System.out.println("Value:"+nvp.getValueAsNumeric());
}


IBM Unica Interact
 
8.5.0
For more information, see our support and community site: Customer Central