Package com.scriptbasic.utility
Class RightValueUtility
java.lang.Object
com.scriptbasic.utility.RightValueUtility
public final class RightValueUtility
extends java.lang.Object
- Author:
- Peter Verhas date June 26, 2012
-
Method Summary
Modifier and Type Method Description static java.lang.Integerconvert2Integer(RightValue index)static RightValuecreateRightValue(java.lang.Object value)Create a right value from the object.static RightValue[]createRightValues(java.lang.Object[] values)Create a right value array from an object array.static java.lang.ObjectgetValueObject(RightValue arg)
-
Method Details
-
getValueObject
-
convert2Integer
- Throws:
ScriptBasicException
-
createRightValue
Create a right value from the object. If the object is already a right value then just return the object. If the object is some primitive object (Long, Integer, Short, Float, Double, String, Character, Boolean then it creates a Basic object that holds a Long, Double, String or Boolean value.In other cases the method will return a
BasicJavaObjectValue.- Parameters:
value- the original value to convert to a right value- Returns:
- the converted right value
-
createRightValues
Create a right value array from an object array. Allocate the new array and convert each element of the object array into a right value.- Parameters:
values- the object array to convert to right values- Returns:
- the array of right values converted from the object array
-