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

de.rpgframework.genericrpg.persist.StringArrayConverter Maven / Gradle / Ivy

The newest version!
package de.rpgframework.genericrpg.persist;

import org.prelle.simplepersist.StringValueConverter;

/**
 * @author prelle
 *
 */
public class StringArrayConverter implements StringValueConverter {

	@Override
	public String write(String[] v) throws Exception {
		return String.join(",", v);
	}

	@Override
	public String[] read(String v) throws Exception {
		if (v.contains("|"))
			return v.split("\\|");
		return v.split(",");
	}

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy