Class Values


  • public class Values
    extends Object
    A class with static methods for wrapping Java property values in Value objects.
    • Constructor Detail

      • Values

        private Values()
    • Method Detail

      • getNil

        public static Value getNil()
        Get the singleton NilValue object.
        Returns:
        a reference to NilValue.
      • toBooleanValue

        public static Value toBooleanValue​(Boolean boolValue)
        Create new instances of BooleanValue
        Parameters:
        boolValue - the value to wrap
        Returns:
        a BooleanValue instance
      • toBooleanValue

        public static Value toBooleanValue​(boolean boolValue)
        Create new instances of BooleanValue
        Parameters:
        boolValue - the value to wrap
        Returns:
        a BooleanValue instance
      • toLongValue

        public static Value toLongValue​(Long intValue)
        Create new instances of LongValue
        Parameters:
        intValue - the value to wrap
        Returns:
        a LongValue instance
      • toLongValue

        public static Value toLongValue​(long intValue)
        Create new instances of LongValue
        Parameters:
        intValue - the value to wrap
        Returns:
        a LongValue instance
      • toDoubleValue

        public static Value toDoubleValue​(Double doubleValue)
        Create new instances of DoubleValue
        Parameters:
        doubleValue - the value to wrap
        Returns:
        a DoubleValue instance
      • toDoubleValue

        public static Value toDoubleValue​(double doubleValue)
        Create new instances of DoubleValue
        Parameters:
        doubleValue - the value to wrap
        Returns:
        a DoubleValue instance
      • toStringValue

        public static Value toStringValue​(String stringValue)
        Create new instances of StringValue
        Parameters:
        stringValue - the value to wrap
        Returns:
        a StringValue instance
      • toComplexValue

        public static Value toComplexValue​(Propertyset complexValue,
                                           boolean makeDefensiveCopy)
        Create new instances of ComplexValue
        Parameters:
        complexValue - the value to wrap
        makeDefensiveCopy - if true, create a copy of the complexValue and give the copy to the value
        Returns:
        a ComplexValue instance
      • toListValue

        static Value toListValue​(ValueList listValue)
        Create new instances of ListValue
        Parameters:
        listValue - the value to wrap
        Returns:
        a ListValue instance
      • toListValue

        static Value toListValue​(ValueList listValue,
                                 boolean makeDefensiveCopy)
        Create new instances of ListValue
        Parameters:
        listValue - the value to wrap
        makeDefensiveCopy - if true, create a copy of the list and give the copy to the value
        Returns:
        a ListValue instance