Class ValueUtilities
- java.lang.Object
-
- org.drools.workbench.screens.guided.dtree.client.widget.utils.ValueUtilities
-
public class ValueUtilities extends Object
Utilities to handle Values
-
-
Constructor Summary
Constructors Constructor Description ValueUtilities()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static org.drools.workbench.models.guided.dtree.shared.model.values.Valueclone(org.drools.workbench.models.guided.dtree.shared.model.values.Value value)Clone a Value object from the given Value.static StringconvertNodeValue(org.drools.workbench.models.guided.dtree.shared.model.values.Value value)Convert a Value to a Stringstatic org.drools.workbench.models.guided.dtree.shared.model.values.ValuemakeEmptyValue(String dataType)Create a Value object for the given data type.
-
-
-
Method Detail
-
convertNodeValue
public static String convertNodeValue(org.drools.workbench.models.guided.dtree.shared.model.values.Value value)
Convert a Value to a String- Parameters:
value-- Returns:
-
makeEmptyValue
public static org.drools.workbench.models.guided.dtree.shared.model.values.Value makeEmptyValue(String dataType)
Create a Value object for the given data type. Values will be initialised:- Numbers - 0
- String - new String()
- Boolean - Boolean.FALSE
- Date - new Date()
- Parameters:
dataType- The data type- Returns:
- An initialized Value or null if the data type was not recognised
-
clone
public static org.drools.workbench.models.guided.dtree.shared.model.values.Value clone(org.drools.workbench.models.guided.dtree.shared.model.values.Value value)
Clone a Value object from the given Value.- Parameters:
value- The Value to clone- Returns:
- A cloned Value
-
-