com.feilong.lib.xstream.converters.SingleValueConverter Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of feilong Show documentation
Show all versions of feilong Show documentation
feilong is a suite of core and expanded libraries that include utility classes, http, excel,cvs, io classes, and much much more.
/*
* 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.feilong.lib.xstream.converters;
/**
* SingleValueConverter implementations are marshallable to/from a single value String representation.
*
*
* {@link com.feilong.lib.xstream.converters.basic.AbstractSingleValueConverter}
* provides a starting point for objects that can store all information in a single value String.
*
*
* @author Joe Walnes
* @author Jörg Schaible
* @author Mauro Talevi
* @see com.feilong.lib.xstream.converters.Converter
* @see com.feilong.lib.xstream.converters.basic.AbstractSingleValueConverter
* @since 1.2
*/
public interface SingleValueConverter extends ConverterMatcher{
/**
* Marshals an Object into a single value representation.
*
* @param obj
* the Object to be converted
* @return a String with the single value of the Object or null
*/
public String toString(Object obj);
/**
* Unmarshals an Object from its single value representation.
*
* @param str
* the String with the single value of the Object
* @return the Object
*/
public Object fromString(String str);
}