public class OptionalFieldType<T> extends FieldType<T>
optional
type,
for which values are specified as FieldType
objects.
This class cannot be instantiated explicitly, but should be referenced using FieldTypes.optional(FieldType)
.
Modifier and Type | Method and Description |
---|---|
void |
assertAssignable(java.lang.Object c,
java.lang.String fieldName)
This method is intended for internal use only and may be removed at any time - do not use.
|
T |
defaultValue()
Get the default value for Optional field type.
|
FieldType<T> |
getContainedType()
Get the FieldType
|
java.lang.String |
getName()
Return the name of this type.
|
T |
parse(java.lang.String value)
Convert a value of this type from the format used in Apama event strings, into
an object of type T, the same type as the containedType parameter when
creating this optional field type.
|
java.lang.String |
toString()
Returns a String representation of the field type.
|
format, getTypeClass, newField
public void assertAssignable(java.lang.Object c, java.lang.String fieldName)
FieldType
assertAssignable
in class FieldType<T>
public T parse(java.lang.String value) throws ParserRuntimeException
parse
in class FieldType<T>
value
- the value to parse.ParserRuntimeException
- If the specified value string cannot be parsed.public T defaultValue()
defaultValue
in class FieldType<T>
public java.lang.String getName()
FieldType
public FieldType<T> getContainedType()
Submit a bug or feature
Copyright (c) 2013-2020 Software AG, Darmstadt, Germany and/or Software AG USA Inc., Reston, VA, USA, and/or its subsidiaries and/or its affiliates and/or their licensors. Use, reproduction, transfer, publication or disclosure is prohibited except as specifically provided for in your License Agreement with Software AG.