org.solovyev.common.text.BooleanMapper Maven / Gradle / Ivy
/*
* Copyright (c) 2009-2011. Created by serso aka se.solovyev.
* For more information, please, contact [email protected]
* or visit http://se.solovyev.org
*/
package org.solovyev.common.text;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
/**
* User: serso
* Date: 9/26/11
* Time: 11:27 PM
*/
public class BooleanMapper implements Mapper{
@NotNull
private final Formatter formatter = new ValueOfFormatter();
@Override
public String formatValue(@Nullable Boolean value) throws IllegalArgumentException {
return formatter.formatValue(value);
}
@Override
public Boolean parseValue(@Nullable String value) throws IllegalArgumentException {
return value == null ? null : Boolean.valueOf(value);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy