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

com.puresoltechnologies.javafx.preferences.serializers.DoublePreferenceSerializer Maven / Gradle / Ivy

There is a newer version: 0.13.0
Show newest version
package com.puresoltechnologies.javafx.preferences.serializers;

import com.puresoltechnologies.javafx.extensions.properties.PropertyDefinition;
import com.puresoltechnologies.javafx.preferences.PreferencesSerializer;

public class DoublePreferenceSerializer implements PreferencesSerializer {

    @Override
    public boolean isSuitable(PropertyDefinition definition) {
	return Double.class.equals(definition.getType());
    }

    @Override
    public String serialize(Double object) {
	return object.toString();
    }

    @Override
    public Double deserialize(PropertyDefinition definition, String string) {
	return Double.parseDouble(string);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy