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

org.dmg.pmml.adapters.FieldNameAdapter Maven / Gradle / Ivy

There is a newer version: 1.6.5
Show newest version
/*
 * Copyright (c) 2014 Villu Ruusmann
 */
package org.dmg.pmml.adapters;

import jakarta.xml.bind.annotation.adapters.XmlAdapter;

public class FieldNameAdapter extends XmlAdapter {

	@Override
	public String unmarshal(String value){

		if(value == null){
			throw new NullPointerException();
		} else

		if(("").equals(value)){
			throw new IllegalArgumentException("Field name cannot be empty");
		}

		return value.intern();
	}

	@Override
	public String marshal(String value){
		return value;
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy