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

com.thoughtworks.xstream.converters.basic.AbstractSingleValueConverter Maven / Gradle / Ivy

There is a newer version: 0.40.13
Show newest version
/*
 * Copyright (C) 2006, 2007, 2013 XStream Committers.
 * All rights reserved.
 *
 * The software in this package is published under the terms of the BSD
 * style license a copy of which has been included with this distribution in
 * the LICENSE.txt file.
 * 
 * Created on 15. February 2006 by Mauro Talevi
 */
package com.thoughtworks.xstream.converters.basic;

import com.thoughtworks.xstream.converters.SingleValueConverter;

/**
 * Base abstract implementation of  {@link com.thoughtworks.xstream.converters.SingleValueConverter}.
 *
 * 

Subclasses should implement methods canConvert(Class) and fromString(String) for the conversion.

* * @author Joe Walnes * @author Jörg Schaible * @author Mauro Talevi * @see com.thoughtworks.xstream.converters.SingleValueConverter */ public abstract class AbstractSingleValueConverter implements SingleValueConverter { public abstract boolean canConvert(Class type); public String toString(Object obj) { return obj == null ? null : obj.toString(); } public abstract Object fromString(String str); }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy