Package org.zkoss.bind.converter
Class ObjectBooleanConverter
java.lang.Object
org.zkoss.bind.converter.ObjectBooleanConverter
- All Implemented Interfaces:
Serializable,Converter
Converter to convert boolean to Object.
- Since:
- 6.0.0
- Author:
- henrichen
- See Also:
-
Field Summary
Fields inherited from interface org.zkoss.bind.Converter
IGNORED_VALUE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncoerceToBean(Object val, org.zkoss.zk.ui.Component comp, BindContext ctx) Given an object value and return whether it is a "true" object.coerceToUi(Object val, org.zkoss.zk.ui.Component comp, BindContext ctx) Given a Boolean value and return associated "true" object if true; or "false" object if null or false
-
Constructor Details
-
ObjectBooleanConverter
public ObjectBooleanConverter()
-
-
Method Details
-
coerceToBean
Given an object value and return whether it is a "true" object.- Specified by:
coerceToBeanin interfaceConverter- Parameters:
val- the object to be checked if a true objectcomp- associated Componentctx- bind context for associateBindingand extra parameter (e.g. true and false)- Returns:
- the converted Boolean object
-
coerceToUi
Given a Boolean value and return associated "true" object if true; or "false" object if null or false- Specified by:
coerceToUiin interfaceConverter- Parameters:
val- the boolean value to be checked.comp- associate Componentctx- bind context for associateBindingand extra parameter (e.g. true and false)- Returns:
- the converted "true" object if true; or "false" object if null or false.
-