com.aldebaran.qi
T
- Property type. Be sure the type is:
* One of default : Byte, Short, Int, Long, Float, Double, String, List, Map, Tuple, QiStruct.
* Or managed by a QiSerializer
.public final class Property<T> extends Object
Constructor and Description |
---|
Property(Class<T> valueClass)
Create an empty property.
|
Property(Class<T> valueClass,
T value)
Create a property with a class and a value.
|
Property(T value)
Create a property with a value.
|
Modifier and Type | Method and Description |
---|---|
protected void |
finalize()
Called by JVM when object is garbage collected
|
Future<T> |
getValue()
Current property value.
|
Future<T> |
getValue(QiSerializer qiSerializer)
Current property value.
|
Future<Void> |
setValue(QiSerializer qiSerializer,
T value)
Change property value
|
Future<Void> |
setValue(T value)
Change property value
Here it used the default serializer, so it suppose that the property type
is managed by it.
|
public Property(Class<T> valueClass)
valueClass
- The property value class.NullPointerException
- if valueClass parameter is null.public Property(T value)
value
- Value to initialize the property with.NullPointerException
- if value parameter is null.public Property(Class<T> valueClass, T value)
valueClass
- The property value class.value
- Value to initialize the property with.NullPointerException
- if either value or valueClass is null.public Future<T> getValue()
getValue(QiSerializer)
public Future<T> getValue(QiSerializer qiSerializer)
qiSerializer
- Serializer to use for deserialize the value. Must not be nullpublic Future<Void> setValue(T value)
setValue(QiSerializer, Object)
value
- New value. Warning may have strange result with null
public Future<Void> setValue(QiSerializer qiSerializer, T value)
qiSerializer
- Serializer to use for serialize the value. Must not be nullvalue
- New value. Warning may have strange result with null
Copyright © 2019. All rights reserved.