public class Point3DPropertyType extends PropertyType<Point3D>
dk.heick.properties.types.custom.Point3D value. | Constructor Example | Comments | ||
|---|---|---|---|
Property<Point3D> A_PROPERTY = |
Creates Point3DPropertyType with no default value. | ||
Property<Point3D> A_PROPERTY = |
Creates Point3DPropertyType with a a default value . | ||
| Type of value(s) | Examples | Result | Comments |
| Valid | 3,4,5 | new Point3D(3,4,5) | Validate successfully. |
| Valid | -3.453E-23,99.88,0.0007 | new Point3D(-3.453E-23,99.88,0.0007) | Validate successfully. |
| Invalid | cow | null |
Validate will throw an exception. The resulting value is null. |
| Invalid | «empty string» | null |
|
| Invalid | «empty string after trim» | null |
|
| Invalid | 555,33,666,333,333 | null |
|
Point3D,
Serialized Form| Modifier and Type | Field and Description |
|---|---|
static String |
TYPE
The type name string constant of Point3D.
|
static char |
VALUE_SEPERATOR
The char which seperates the two integer values.
|
| Constructor and Description |
|---|
Point3DPropertyType()
Default constructor, no default value.
|
Point3DPropertyType(double x,
double y,
double z)
Constructor with default x,y,z values.
|
Point3DPropertyType(Point3D defaultValue)
Constructor with default value.
|
| Modifier and Type | Method and Description |
|---|---|
List<String> |
getRestrictions()
Gets a detailed description of the PropertyType with any constraints that might influence the validation.
|
String |
toString(String propertyName,
Point3D t)
Converts a typed to the string representation.
|
Point3D |
validateValue(String propertyName,
String value)
Converts the string representation of to a typed value.
|
equals, getDefaultValue, getDefaultValueAsString, getDefaultValueDescription, getDescription, getDescription, getInitializationPriority, getIo, getLogger, getTypeName, hasDefaultValue, isDefaultValueValid, postGetValueProcessing, setDefaultValue, setInitializationPriority, setIo, setTypedValue, setTypeName, toType, validate, validateConstraints, validateNullTypepublic static final String TYPE
public static final char VALUE_SEPERATOR
public Point3DPropertyType()
public Point3DPropertyType(Point3D defaultValue)
defaultValue - defaultValue default value returned if property value is undefined.public Point3DPropertyType(double x,
double y,
double z)
x - default x value.y - default y value.z - default z value.public List<String> getRestrictions()
PropertyTypegetRestrictions in class PropertyType<Point3D>public Point3D validateValue(String propertyName, String value) throws PropertyException
PropertyTypevalidateValue in class PropertyType<Point3D>propertyName - the name of the property used for logging purposes. To uniquely identify the Property with validation issues.value - the string representation of the propertyPropertyException - if the conversion failed.public String toString(String propertyName, Point3D t) throws PropertyException
PropertyTypetoString in class PropertyType<Point3D>propertyName - the name of the property used for logging purposes.t - the type T.PropertyException - if conversion failed in validation.PropertyType.validate(String, String)