net.sf.andromedaioc.bean.converter.fromboolean.FromBooleanToDoubleConverter Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of andromeda-ioc Show documentation
Show all versions of andromeda-ioc Show documentation
Inversion of Control Framework for Android
The newest version!
package net.sf.andromedaioc.bean.converter.fromboolean;
import net.sf.andromedaioc.bean.converter.Converter;
/**
* From Boolean to Double converter
*
* @author Alexey Mitrov
*/
public class FromBooleanToDoubleConverter implements Converter {
public Double convert(Boolean input) {
return input == null ? null : (input ? Double.valueOf(1.0) : Double.valueOf(0.0));
}
}