Module odo.core
Package net.odoframework.beans
Class ConvertingPropertyBinding<Source,TargetType,SourceType>
java.lang.Object
net.odoframework.beans.PropertyBinding<Source,TargetType>
net.odoframework.beans.ConvertingPropertyBinding<Source,TargetType,SourceType>
- All Implemented Interfaces:
Binding<Source,TargetType>
public class ConvertingPropertyBinding<Source,TargetType,SourceType> extends PropertyBinding<Source,TargetType>
-
Field Summary
Fields inherited from class net.odoframework.beans.PropertyBinding
getter, setter -
Constructor Summary
Constructors Constructor Description ConvertingPropertyBinding(BiConsumer<Source,TargetType> setter)ConvertingPropertyBinding(Function<Source,TargetType> getter)ConvertingPropertyBinding(Function<Source,TargetType> getter, BiConsumer<Source,TargetType> setter, Function<SourceType,TargetType> toTarget, Function<TargetType,SourceType> fromTarget) -
Method Summary
Modifier and Type Method Description SourceTypegetConverted(Source instance)static <T, K> ConvertingPropertyBinding<T,K,K>passThrough(Function<T,K> getter, BiConsumer<T,K> setter)voidsetConverted(Source instance, SourceType value)static <T, K, Z> ConvertingPropertyBinding<T,K,Z>withConversion(Function<T,K> getter, BiConsumer<T,K> setter, Class<K> target, Class<Z> raw)
-
Constructor Details
-
ConvertingPropertyBinding
public ConvertingPropertyBinding(Function<Source,TargetType> getter, BiConsumer<Source,TargetType> setter, Function<SourceType,TargetType> toTarget, Function<TargetType,SourceType> fromTarget) -
ConvertingPropertyBinding
-
ConvertingPropertyBinding
-
-
Method Details
-
getConverted
-
setConverted
-
passThrough
public static <T, K> ConvertingPropertyBinding<T,K,K> passThrough(Function<T,K> getter, BiConsumer<T,K> setter) -
withConversion
public static <T, K, Z> ConvertingPropertyBinding<T,K,Z> withConversion(Function<T,K> getter, BiConsumer<T,K> setter, Class<K> target, Class<Z> raw)
-