V - The Java type of the value handled by this datatype.public interface Datatype<V>
| Modifier and Type | Interface and Description |
|---|---|
static class |
Datatype.Builtin
Mapping from UPnP built-in standardized type to actual subtype of
Datatype. |
static class |
Datatype.Default
Mapping from Java type to UPnP built-in type.
|
| Modifier and Type | Method and Description |
|---|---|
Datatype.Builtin |
getBuiltin() |
String |
getDisplayString() |
String |
getString(V value)
Transforms a value supported by this datatype into a string representation.
|
boolean |
isHandlingJavaType(Class type) |
boolean |
isValid(V value) |
V |
valueOf(String s)
Transforms a string representation into a value of the supported type.
|
boolean isHandlingJavaType(Class type)
true if this datatype can handle values of the given Java type.Datatype.Builtin getBuiltin()
null if this is a custom datatype.boolean isValid(V value)
value - The value to validate or null.true if the value was null, validation result otherwise.String getString(V value) throws InvalidValueException
This method calls isValid(Object) before converting the value, it throws
an exception if validation fails.
value - The value to transform.null.InvalidValueExceptionV valueOf(String s) throws InvalidValueException
s - The string representation of a value.null if the string was null or empty.InvalidValueException - If the string couldn't be parsed.String getDisplayString()
Copyright © 2023 jUPnP.org. All rights reserved.