@Test public void format(){ assertEquals("1", TypeUtil.format("1")); assertEquals("1", TypeUtil.format((byte)1)); assertEquals("1", TypeUtil.format((short)1)); assertEquals("1", TypeUtil.format(1)); assertEquals("1", TypeUtil.format(1l)); assertEquals("1.0", TypeUtil.format(1f)); assertEquals("1.0", TypeUtil.format(1.0f)); assertEquals("1.0", TypeUtil.format(1d)); assertEquals("1.0", TypeUtil.format(1.0d)); }
static public String format(Object value){ if(value instanceof ComplexValue){ ComplexValue complexValue = (ComplexValue)value; value = complexValue.toSimpleValue(); } return toString(value); }
TypeUtil { static public String format(Object value){ if(value instanceof ComplexValue){ ComplexValue complexValue = (ComplexValue)value; value = complexValue.toSimpleValue(); } return toString(value); } }
TypeUtil { static public String format(Object value){ if(value instanceof ComplexValue){ ComplexValue complexValue = (ComplexValue)value; value = complexValue.toSimpleValue(); } return toString(value); } private  TypeUtil(); }
TypeUtil { static public String format(Object value){ if(value instanceof ComplexValue){ ComplexValue complexValue = (ComplexValue)value; value = complexValue.toSimpleValue(); } return toString(value); } private  TypeUtil(); static String format(Object value); static Object parseOrCast(DataType dataType, Object value); static Object parse(DataType dataType, String value); static DaysSinceDate parseDaysSinceDate(LocalDate epoch, String value); static boolean equals(DataType dataType, Object value, Object referenceValue); static DataType getDataType(Object value); static DataType getDataType(Collection<?> values); static DataType getCommonDataType(DataType left, DataType right); static OpType getOpType(DataType dataType); static Object cast(DataType dataType, Object value); static V cast(Class<? extends V> clazz, Object value); static DataType getConstantDataType(Object value); static DataType getConstantDataType(String value); }
TypeUtil { static public String format(Object value){ if(value instanceof ComplexValue){ ComplexValue complexValue = (ComplexValue)value; value = complexValue.toSimpleValue(); } return toString(value); } private  TypeUtil(); static String format(Object value); static Object parseOrCast(DataType dataType, Object value); static Object parse(DataType dataType, String value); static DaysSinceDate parseDaysSinceDate(LocalDate epoch, String value); static boolean equals(DataType dataType, Object value, Object referenceValue); static DataType getDataType(Object value); static DataType getDataType(Collection<?> values); static DataType getCommonDataType(DataType left, DataType right); static OpType getOpType(DataType dataType); static Object cast(DataType dataType, Object value); static V cast(Class<? extends V> clazz, Object value); static DataType getConstantDataType(Object value); static DataType getConstantDataType(String value);  }