All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.solovyev.common.text.BooleanMapper Maven / Gradle / Ivy

There is a newer version: 1.0.7
Show newest version
/*
 * 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