Class TLcdAIXM51Optional<T>
- All Implemented Interfaces:
ILcdDataObject
,ILcdCloneable
,ILcdDeepCloneable
,Cloneable
An optional is a ILcdDataObject with a value property and an optional nil reason property to explain why the value is not filled in.
This class is typically used as a UML association class. This means that it implements
an association between two other classes. The value property (implemented by
getValueObject()
and setValueObject(Object)
) is the role
property of this association. In the large majority of cases, only the value of the
role property is used by applications. In those cases, the association class can be
considered to be a mere wrapper. Because of this, the API of the domain objects was made
such that these association classes are not visible in the API. The getters and setters
for properties of which the type is an association class
directly expose the role property. Wrapping and unwrapping is done automatically by the
implementation.
Only when the application uses the generic ILcdDataObject
API to access
the domain objects, these association classes become visible.
- Since:
- 10.0
- See Also:
-
Constructor Summary
ConstructorDescriptionTLcdAIXM51Optional
(TLcdDataType aType) Creates a new optional for the given type. -
Method Summary
Modifier and TypeMethodDescriptionReturns the nilReason attribute of this value.Returns the value of the value property.void
Sets the nilReason attribute of the value.void
setValueObject
(T aValue) Sets the value of the value property to the given valuetoString()
Methods inherited from class com.luciad.datamodel.TLcdDataObject
clone, clone, getDataType, getValue, getValue, hasValue, hasValue, setValue, setValue
-
Constructor Details
-
TLcdAIXM51Optional
Creates a new optional for the given type.- Parameters:
aType
-
-
-
Method Details
-
getNilReason
Returns the nilReason attribute of this value. The nilReason should be set when the value is null.- Returns:
- The nilReason, can be null.
-
setNilReason
Sets the nilReason attribute of the value. Set to null if the value is not null.- Parameters:
aReason
- A nilReason or null.
-
getValueObject
Returns the value of the value property. Note that this method is calledgetValueObject
in order not to clash with existinggetValue
methods.- Returns:
- the value of the value property
-
setValueObject
Sets the value of the value property to the given value- Parameters:
aValue
- the value to set
-
toString
- Overrides:
toString
in classTLcdDataObject
-