Class pvr.controller.value.utils.NumberUtil

Provides conversion and comparison methods for values of type "integer", "float" and "boolean".
Defined in: <pvr\controller\value\utils\NumberUtil.js>.

Constructor Summary

Constructor Attributes Constructor Name and Description
 

Field Summary

Field Attributes Field Name and Description
<constant>  
The maximum integer value.
<constant>  
The minimum integer value.

Method Summary

Method Attributes Method Name and Description
 
booleanToBoolean(value, settings)
Converts a boolean value to a boolean value as specified by the settings.
 
booleanToFloat(value, settings)
Converts a boolean value to a float value as specified by the settings.
 
booleanToInteger(value, settings)
Converts a boolean value to an integer value as specified by the settings.
 
booleanToString(value, settings)
Converts a boolean value to a float value as specified by the settings.
 
compareBoolean(value1, value2)
Compares two boolean values.
 
compareFloat(value1, value2)
Compares two float values.
 
compareInteger(value1, value2)
Compares two integer values.
 
floatToBoolean(value, settings)
Converts a float value to a boolean value as specified by the settings.
 
floatToFloat(value, settings)
Converts a float value to a float value as specified by the settings.
 
floatToInteger(value, settings)
Converts a float value to an integer value as specified by the settings.
 
floatToString(value, settings)
Converts a float value to a string value as specified by the settings.
 
integerToBoolean(value, settings)
Converts an integer value to a boolean value as specified by the settings.
 
integerToFloat(value, settings)
Converts an integer value to a float value as specified by the settings.
 
integerToInteger(value, settings)
Converts an integer value to an integer value as specified by the settings.
 
integerToString(value, settings)
Converts an integer value to a string value as specified by the settings.
 
isInteger(value)
Indicates whether a particular number value is an integer.
 
stringToBoolean(value, settings)
Converts a string value to a boolean value as specified by the settings.
 
stringToFloat(value, settings)
Converts a string value to a float value as specified by the settings.
 
stringToInteger(value, settings)
Converts a string value to an integer value as specified by the settings.

Constructor Detail

pvr.controller.value.utils.NumberUtil()

Field Detail

<constant> maxInteger

The maximum integer value.

<constant> minInteger

The minimum integer value.

Method Detail

booleanToBoolean(value, settings)

Converts a boolean value to a boolean value as specified by the settings.
Parameters:
value
The value.
settings
The settings.
Returns:
The converted value.

booleanToFloat(value, settings)

Converts a boolean value to a float value as specified by the settings.
Parameters:
value
The value.
settings
The settings.
Returns:
The converted value.

booleanToInteger(value, settings)

Converts a boolean value to an integer value as specified by the settings.
Parameters:
value
The value.
settings
The settings.
Returns:
The converted value.

booleanToString(value, settings)

Converts a boolean value to a float value as specified by the settings.
Parameters:
value
The value.
settings
The settings.
Returns:
The converted value.

compareBoolean(value1, value2)

Compares two boolean values.
Parameters:
value1
The first value.
value2
The second value.
Returns:
0 if value1 and value2 are equal, -1 if value1 is less than value2, or 1 if value1 is greater than value2.

compareFloat(value1, value2)

Compares two float values.
Parameters:
value1
The first value.
value2
The second value.
Returns:
0 if value1 and value2 are equal, -1 if value1 is less than value2, or 1 if value1 is greater than value2.

compareInteger(value1, value2)

Compares two integer values.
Parameters:
value1
The first value.
value2
The second value.
Returns:
0 if value1 and value2 are equal, -1 if value1 is less than value2, or 1 if value1 is greater than value2.

floatToBoolean(value, settings)

Converts a float value to a boolean value as specified by the settings.
Parameters:
value
The value.
settings
The settings.
Returns:
The converted value or undefined if the conversion fails.

floatToFloat(value, settings)

Converts a float value to a float value as specified by the settings.
Parameters:
value
The value.
settings
The settings.
Returns:
The converted value.

floatToInteger(value, settings)

Converts a float value to an integer value as specified by the settings.
Parameters:
value
The value.
settings
The settings.
Returns:
The converted value or undefined if the conversion fails.

floatToString(value, settings)

Converts a float value to a string value as specified by the settings.
Parameters:
value
The value.
settings
The settings.
Returns:
The converted value.

integerToBoolean(value, settings)

Converts an integer value to a boolean value as specified by the settings.
Parameters:
value
The value.
settings
The settings.
Returns:
The converted value or undefined if the conversion fails.

integerToFloat(value, settings)

Converts an integer value to a float value as specified by the settings.
Parameters:
value
The value.
settings
The settings.
Returns:
The converted value.

integerToInteger(value, settings)

Converts an integer value to an integer value as specified by the settings.
Parameters:
value
The value.
settings
The settings.
Returns:
The converted value.

integerToString(value, settings)

Converts an integer value to a string value as specified by the settings.
Parameters:
value
The value.
settings
The settings.
Returns:
The converted value.

isInteger(value)

Indicates whether a particular number value is an integer.
Parameters:
value
The value.
Returns:
true if the number is an integer.

stringToBoolean(value, settings)

Converts a string value to a boolean value as specified by the settings.
Parameters:
value
The value.
settings
The settings.
Returns:
The converted value or undefined if the conversion fails.

stringToFloat(value, settings)

Converts a string value to a float value as specified by the settings.
Parameters:
value
The value.
settings
The settings.
Returns:
The converted value or undefined if the conversion fails.

stringToInteger(value, settings)

Converts a string value to an integer value as specified by the settings.
Parameters:
value
The value.
settings
The settings.
Returns:
The converted value or undefined if the conversion fails.