1 /*******************************************************************************
2 * Copyright (c) 2007, 2010 Association for Decentralized Information Management
4 * All rights reserved. This program and the accompanying materials
5 * are made available under the terms of the Eclipse Public License v1.0
6 * which accompanies this distribution, and is available at
7 * http://www.eclipse.org/legal/epl-v10.html
10 * VTT Technical Research Centre of Finland - initial API and implementation
11 *******************************************************************************/
12 package org.simantics.ui.utils;
14 import java.util.Collection;
17 * @author Antti Villberg
18 * @author Marko Luukkainen
19 * @Deprecated use org.simantics.utils.ui.AdaptionUtils
22 public class AdaptionUtils {
24 public static <T> T adaptToSingle(Object o, Class<T> clazz) {
25 return org.simantics.utils.ui.AdaptionUtils.adaptToSingle(o, clazz);
29 * Adapts given object to collection of objects of given class.
32 * @return collection of objects of given class.
34 public static <T> Collection<T> adaptToCollection(Object o, Class<T> clazz) {
35 return org.simantics.utils.ui.AdaptionUtils.adaptToCollection(o, clazz);
38 public static <T> Collection<T> adaptToCollection(Object arr[], Class<T> clazz) {
39 return org.simantics.utils.ui.AdaptionUtils.adaptToCollection(arr, clazz);