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

sk.seges.sesam.utils.CastUtils Maven / Gradle / Ivy

Go to download

Core interfaces and support classes to ease information systems development. Usually requirement is to implement multi-tier application using database, DAOs, services, models and listeners.

The newest version!
package sk.seges.sesam.utils;

import java.util.Collection;
import java.util.List;
import java.util.Set;

public final class CastUtils {

	@SuppressWarnings("unchecked")
	public static  List cast(List list, Class type) {
		return (List) list;
	}

	@SuppressWarnings("unchecked")
	public static  Collection cast(Collection list, Class type) {
		return (Collection) list;
	}

	@SuppressWarnings("unchecked")
	public static  S cast(Object object, Class type) {
		return (S) object;
	}

	@SuppressWarnings("unchecked")
	public static  Set cast(Set set, Class type) {
		return (Set) set;
	}
}