Class RightValueUtility

java.lang.Object
com.scriptbasic.utility.RightValueUtility

public final class RightValueUtility extends Object
Author:
Peter Verhas date June 26, 2012
  • Method Details

    • getValueObject

      public static Object getValueObject(RightValue arg)
    • convert2Integer

      public static Integer convert2Integer(RightValue index) throws ScriptBasicException
      Throws:
      ScriptBasicException
    • createRightValue

      public static RightValue createRightValue(Object value)
      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

      public static RightValue[] createRightValues(Object[] values)
      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