/*
 * Java Genetic Algorithm Library (@__identifier__@).
 * Copyright (c) @__year__@ Franz Wilhelmstötter
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *
 * Author:
 *    Franz Wilhelmstötter (franz.wilhelmstoetter@gmx.at)
 */
package org.jenetics.internal.util;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;
import javax.xml.bind.annotation.XmlValue;
import javax.xml.bind.annotation.adapters.XmlAdapter;

import org.jenetics.util.Function;
import org.jenetics.util.StaticObject;

/**
 * This object contains models for the java primitive/basic types and the
 * integer and float types of the JScience library.
 *
 * @author <a href="mailto:franz.wilhelmstoetter@gmx.at">Franz Wilhelmstötter</a>
 * @version 1.6 &mdash; <em>$Date: 2014-03-18 $</em>
 * @since 2.0
 */
public final class model extends StaticObject {
	private model() {}

	/* ************************************************************************
	 * Java primitive type models.
	 **************************************************************************/

	@XmlRootElement(name = "char")
	@XmlType(name = "char")
	@XmlAccessorType(XmlAccessType.FIELD)
	public static final class CharacterModel {

		@XmlValue
		public String value;

		public static final class Adapter
			extends XmlAdapter<CharacterModel, Character>
		{
			@Override
			public CharacterModel marshal(final Character value) {
				final CharacterModel model = new CharacterModel();
				model.value = value.toString();
				return model;
			}

			@Override
			public Character unmarshal(final CharacterModel model) {
				return model.value.charAt(0);
			}
		}

		public static final Adapter Adapter = new Adapter();

	}

	public static final Function<Character, String> CharacterToString =
		new Function<Character, String>() {
			@Override
			public String apply(final Character value) {
				return value.toString();
			}
		};

	public static final Function<String, Character> StringToCharacter =
		new Function<String, Character>() {
			@Override
			public Character apply(final String value) {
				return value.charAt(0);
			}
		};
}

@@ -1062,43 +1062,8 @@
 r;%0A%0A
-import org.jenetics.util.Function;%0A
 impo
@@ -1137,101 +1137,38 @@
 els 
-for the java primitive/basic types and the%0A * integer and float types of the JScience library
+not defined as native XML type
 .%0A *
@@ -1394,196 +1394,8 @@
 %7B%7D%0A%0A
-%09/* ************************************************************************%0A%09 * Java primitive type models.%0A%09 **************************************************************************/%0A%0A
 %09@Xm
@@ -2023,420 +2023,6 @@
 %09%7D%0A%0A
-%09public static final Function%3CCharacter, String%3E CharacterToString =%0A%09%09new Function%3CCharacter, String%3E() %7B%0A%09%09%09@Override%0A%09%09%09public String apply(final Character value) %7B%0A%09%09%09%09return value.toString();%0A%09%09%09%7D%0A%09%09%7D;%0A%0A%09public static final Function%3CString, Character%3E StringToCharacter =%0A%09%09new Function%3CString, Character%3E() %7B%0A%09%09%09@Override%0A%09%09%09public Character apply(final String value) %7B%0A%09%09%09%09return value.charAt(0);%0A%09%09%09%7D%0A%09%09%7D;%0A
 %7D%0A

Remove unused code.