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

panda.cast.castor.DirectCastor Maven / Gradle / Ivy

Go to download

Panda Core is the core module of Panda Framework, it contains commonly used utility classes similar to apache-commons.

There is a newer version: 1.8.0
Show newest version
package panda.cast.castor;

import panda.cast.CastContext;
import panda.cast.Castor;

/**
 *
 * @param  source type
 * @param  target type
 */
@SuppressWarnings("rawtypes")
public class DirectCastor implements Castor {
	public static DirectCastor INSTANCE = new DirectCastor();

	public static Castor i() {
		return INSTANCE;
	}
	
	private DirectCastor() {
	}

	@Override
	@SuppressWarnings("unchecked")
	public T cast(S value, CastContext context) {
		return (T)value;
	}

	@Override
	@SuppressWarnings("unchecked")
	public T castTo(S value, T target) {
		return (T)value;
	}

	@Override
	@SuppressWarnings("unchecked")
	public T castTo(S value, T target, CastContext context) {
		return (T)value;
	}

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy