Class XPropertyValue
java.lang.Object
de.xima.fc.form.common.models.XPropertyValue
- All Implemented Interfaces:
Serializable
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionXPropertyValue(XPropertyEnum xProperty, Object value) XPropertyValue(String xPropertyName, Object value) -
Method Summary
Modifier and TypeMethodDescriptionprotected XPropertyValueclone()booleanget()getChar()Returns the first character of the value as a char.booleanbooleangetDefaultBoolean(boolean defaultValue) chargetDefaultChar(char defaultValue) Returns the first character of the value as a char.doubledoublegetDefaultDouble(double defaultValue) <E extends Enum<E>>
EgetDefaultEnum(Class<E> enumClass, E defaultValue) Reads the value as a string and tries to parse it as an enum.<E extends Enum<E>>
EgetDefaultEnum(Function<String, E> enumParser, E defaultValue) Reads the value as a string and tries to parse it as an enum.intintgetDefaultInt(int defaultValue) com.alibaba.fastjson.JSONArraycom.alibaba.fastjson.JSONObjectlonggetDefaultLong(long defaultValue) Returns the value as a long.Similar togetString(), but returns an empty string if the value is null.getDefaultString(String defaultValue) Similar togetString(), but returns the default value if the value is null.getDefaultStringIfBlank(String defaultValue) Similar togetString(), but returns the default value if the value is null or blank.getDefaultStringIfEmpty(String defaultValue) Similar togetString(), but returns the default value if the value is null or empty.<E extends Enum<E>>
EReads the value as a string and tries to parse it as an enum.<E extends Enum<E>>
EReads the value as a string and tries to parse it as an enum.getInt()com.alibaba.fastjson.JSONArraycom.alibaba.fastjson.JSONObjectgetLong()getUUID()inthashCode()void
-
Constructor Details
-
XPropertyValue
-
XPropertyValue
-
-
Method Details
-
getXPropertyEnum
-
getPropertyName
-
get
-
getInt
-
getLong
-
getDouble
-
getString
-
getUUID
-
getBoolean
-
getJSONArray
public com.alibaba.fastjson.JSONArray getJSONArray() -
getJSONObject
public com.alibaba.fastjson.JSONObject getJSONObject() -
setValue
-
clone
-
getDefaultBoolean
public boolean getDefaultBoolean() -
getDefaultBoolean
public boolean getDefaultBoolean(boolean defaultValue) -
getDefaultLong
public long getDefaultLong(long defaultValue) Returns the value as a long. If the value is null or cannot be parsed as a long, returns the default value.- Returns:
- The value as a long, or the default value if the value is null or cannot be parsed as a long.
-
getChar
Returns the first character of the value as a char. If the value is null or empty, returns null.- Returns:
- The first character of the value as a char, or null if the value is null or empty.
-
getDefaultChar
public char getDefaultChar(char defaultValue) Returns the first character of the value as a char. If the value is null or empty, returns the default value.- Parameters:
defaultValue- The default value to return if the value is null or empty.- Returns:
- The first character of the value as a char, or the default value if the value is null or empty.
-
getEnum
Reads the value as a string and tries to parse it as an enum. If the value is null or cannot be parsed as an enum, returns null.- Type Parameters:
E- The enum type.- Parameters:
enumClass- The enum class to parse the value as.- Returns:
- The value as an enum, or the default value if the value is null or cannot be parsed as an enum.
-
getEnum
Reads the value as a string and tries to parse it as an enum. If the value is null or cannot be parsed as an enum, returns null.- Type Parameters:
E- The enum type.- Parameters:
enumParser- Parser for obtaining the enum from the string.- Returns:
- The value as an enum, or the default value if the value is null or cannot be parsed as an enum.
-
getDefaultEnum
Reads the value as a string and tries to parse it as an enum. If the value is null or cannot be parsed as an enum, the default value is returned.- Type Parameters:
E- The enum type.- Parameters:
enumClass- The enum class to parse the value as.defaultValue- The default value to return if the value is null or cannot be parsed as an enum.- Returns:
- The value as an enum, or the default value if the value is null or cannot be parsed as an enum.
-
getDefaultEnum
Reads the value as a string and tries to parse it as an enum. If the value is null or cannot be parsed as an enum, the default value is returned.- Type Parameters:
E- The enum type.- Parameters:
enumParser- Parser for obtaining the enum from the string.defaultValue- The default value to return if the value is null or cannot be parsed as an enum.- Returns:
- The value as an enum, or the default value if the value is null or cannot be parsed as an enum.
-
getDefaultString
Similar togetString(), but returns an empty string if the value is null.- Returns:
- The value as a string, or an empty string if the value is null.
-
getDefaultString
Similar togetString(), but returns the default value if the value is null.- Parameters:
defaultValue- The default value to return if the value is null.- Returns:
- The value as a string, or the default value if the value is null.
-
getDefaultStringIfEmpty
Similar togetString(), but returns the default value if the value is null or empty.- Parameters:
defaultValue- The default value to return if the value is null or empty.- Returns:
- The value as a string, or the default value if the value is null or empty.
-
getDefaultStringIfBlank
Similar togetString(), but returns the default value if the value is null or blank.- Parameters:
defaultValue- The default value to return if the value is null or blank.- Returns:
- The value as a string, or the default value if the value is null or blank.
-
getDefaultInt
public int getDefaultInt() -
getDefaultInt
public int getDefaultInt(int defaultValue) -
getDefaultDouble
public double getDefaultDouble() -
getDefaultDouble
public double getDefaultDouble(double defaultValue) -
getDefaultJSONArray
public com.alibaba.fastjson.JSONArray getDefaultJSONArray() -
getDefaultJSONObject
public com.alibaba.fastjson.JSONObject getDefaultJSONObject() -
equals
-
hashCode
-