Class Values
- java.lang.Object
-
- no.priv.bang.modeling.modelstore.value.Values
-
-
Constructor Summary
Constructors Modifier Constructor Description private
Values()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Value
getNil()
Get the singletonNilValue
object.static Propertyset
getNilPropertyset()
Get the singletonPropertysetNil
object.static ValueList
newList()
Create new instances ofValueArrayList
.static Value
toBooleanValue(boolean boolValue)
Create new instances ofBooleanValue
static Value
toBooleanValue(Boolean boolValue)
Create new instances ofBooleanValue
static Value
toComplexValue(Propertyset complexValue)
Create new instances ofComplexValue
static Value
toComplexValue(Propertyset complexValue, boolean makeDefensiveCopy)
Create new instances ofComplexValue
static Value
toDoubleValue(double doubleValue)
Create new instances ofDoubleValue
static Value
toDoubleValue(Double doubleValue)
Create new instances ofDoubleValue
(package private) static Value
toListValue(ValueList listValue)
Create new instances ofListValue
(package private) static Value
toListValue(ValueList listValue, boolean makeDefensiveCopy)
Create new instances ofListValue
static Value
toLongValue(long intValue)
Create new instances ofLongValue
static Value
toLongValue(Long intValue)
Create new instances ofLongValue
static Value
toReferenceValue(Propertyset referencedValue)
Create new instances ofReferenceValue
static Value
toStringValue(String stringValue)
Create new instances ofStringValue
-
-
-
Method Detail
-
getNilPropertyset
public static Propertyset getNilPropertyset()
Get the singletonPropertysetNil
object.- Returns:
- a reference to
PropertysetNil
.
-
getNil
public static Value getNil()
Get the singletonNilValue
object.- Returns:
- a reference to
NilValue
.
-
toBooleanValue
public static Value toBooleanValue(Boolean boolValue)
Create new instances ofBooleanValue
- Parameters:
boolValue
- the value to wrap- Returns:
- a
BooleanValue
instance
-
toBooleanValue
public static Value toBooleanValue(boolean boolValue)
Create new instances ofBooleanValue
- Parameters:
boolValue
- the value to wrap- Returns:
- a
BooleanValue
instance
-
toLongValue
public static Value toLongValue(Long intValue)
Create new instances ofLongValue
- Parameters:
intValue
- the value to wrap- Returns:
- a
LongValue
instance
-
toLongValue
public static Value toLongValue(long intValue)
Create new instances ofLongValue
- Parameters:
intValue
- the value to wrap- Returns:
- a
LongValue
instance
-
toDoubleValue
public static Value toDoubleValue(Double doubleValue)
Create new instances ofDoubleValue
- Parameters:
doubleValue
- the value to wrap- Returns:
- a
DoubleValue
instance
-
toDoubleValue
public static Value toDoubleValue(double doubleValue)
Create new instances ofDoubleValue
- Parameters:
doubleValue
- the value to wrap- Returns:
- a
DoubleValue
instance
-
toStringValue
public static Value toStringValue(String stringValue)
Create new instances ofStringValue
- Parameters:
stringValue
- the value to wrap- Returns:
- a
StringValue
instance
-
toComplexValue
public static Value toComplexValue(Propertyset complexValue)
Create new instances ofComplexValue
- Parameters:
complexValue
- the value to wrap- Returns:
- a
ComplexValue
instance
-
toComplexValue
public static Value toComplexValue(Propertyset complexValue, boolean makeDefensiveCopy)
Create new instances ofComplexValue
- Parameters:
complexValue
- the value to wrapmakeDefensiveCopy
- if true, create a copy of the complexValue and give the copy to the value- Returns:
- a
ComplexValue
instance
-
toReferenceValue
public static Value toReferenceValue(Propertyset referencedValue)
Create new instances ofReferenceValue
- Parameters:
referencedValue
- the value to wrap- Returns:
- a
ReferenceValue
instance
-
toListValue
static Value toListValue(ValueList listValue)
Create new instances ofListValue
- Parameters:
listValue
- the value to wrap- Returns:
- a
ListValue
instance
-
toListValue
static Value toListValue(ValueList listValue, boolean makeDefensiveCopy)
Create new instances ofListValue
- Parameters:
listValue
- the value to wrapmakeDefensiveCopy
- if true, create a copy of the list and give the copy to the value- Returns:
- a
ListValue
instance
-
newList
public static ValueList newList()
Create new instances ofValueArrayList
.- Returns:
- a new empty instance of
ValueArrayList
.
-
-