Package cz.o2.proxima.core.scheme
Class AttributeValueAccessors.PrimitiveValueAccessorImpl<T,V>
- java.lang.Object
-
- cz.o2.proxima.core.scheme.AttributeValueAccessors.PrimitiveValueAccessorImpl<T,V>
-
- Type Parameters:
T
- input typeV
- output type
- All Implemented Interfaces:
AttributeValueAccessor<T,V>
,AttributeValueAccessors.PrimitiveValueAccessor<T,V>
,java.io.Serializable
- Enclosing class:
- AttributeValueAccessors
public static class AttributeValueAccessors.PrimitiveValueAccessorImpl<T,V> extends java.lang.Object implements AttributeValueAccessors.PrimitiveValueAccessor<T,V>
Default implementation ofAttributeValueAccessors.PrimitiveValueAccessor
which useUnaryFunction
to conversions.- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface cz.o2.proxima.core.scheme.AttributeValueAccessor
AttributeValueAccessor.Type
-
-
Constructor Summary
Constructors Constructor Description PrimitiveValueAccessorImpl(UnaryFunction<T,V> valueOfConvertCallback, UnaryFunction<V,T> createFromConvertCallback)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description T
createFrom(V object)
Create value from input object.V
valueOf(T object)
Get value of attribute.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface cz.o2.proxima.core.scheme.AttributeValueAccessors.PrimitiveValueAccessor
getType
-
-
-
-
Constructor Detail
-
PrimitiveValueAccessorImpl
public PrimitiveValueAccessorImpl(UnaryFunction<T,V> valueOfConvertCallback, UnaryFunction<V,T> createFromConvertCallback)
-
-
Method Detail
-
valueOf
public V valueOf(T object)
Description copied from interface:AttributeValueAccessor
Get value of attribute.- Specified by:
valueOf
in interfaceAttributeValueAccessor<T,V>
- Parameters:
object
- input object- Returns:
- specific value of attribute
-
createFrom
public T createFrom(V object)
Description copied from interface:AttributeValueAccessor
Create value from input object.- Specified by:
createFrom
in interfaceAttributeValueAccessor<T,V>
- Parameters:
object
- input object- Returns:
- attribute value
-
-