package org.djutils.data.serialization;
/**
* FloatSerializer (de)serializes Float objects.
*
* Copyright (c) 2020-2020 Delft University of Technology, Jaffalaan 5, 2628 BX Delft, the Netherlands. All rights reserved. See
* for project information https://djutils.org. The DJUTILS project is
* distributed under a three-clause BSD-style license, which can be found at
* https://djutils.org/docs/license.html.
*
* @author Alexander Verbraeck
* @author Peter Knoppers
* @author Wouter Schakel
*/
public class FloatSerializer implements TextSerializer
{
/** {@inheritDoc} */
@Override
public String serialize(final Object value)
{
return String.valueOf(((Float) value).floatValue());
}
/** {@inheritDoc} */
@Override
public Float deserialize(final String text)
{
return Float.valueOf(text);
}
}