]> gerrit.simantics Code Review - simantics/platform.git/blob - bundles/org.simantics.ui/src/org/simantics/ui/utils/AdaptionUtils.java
Fixed all line endings of the repository
[simantics/platform.git] / bundles / org.simantics.ui / src / org / simantics / ui / utils / AdaptionUtils.java
1 /*******************************************************************************
2  * Copyright (c) 2007, 2010 Association for Decentralized Information Management
3  * in Industry THTH ry.
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
8  *
9  * Contributors:
10  *     VTT Technical Research Centre of Finland - initial API and implementation
11  *******************************************************************************/
12 package org.simantics.ui.utils;
13
14 import java.util.Collection;
15
16 /**
17  * @author Antti Villberg
18  * @author Marko Luukkainen
19  * @Deprecated use org.simantics.utils.ui.AdaptionUtils
20  */
21 @Deprecated
22 public class AdaptionUtils {
23
24         public static <T> T adaptToSingle(Object o, Class<T> clazz) {
25                 return org.simantics.utils.ui.AdaptionUtils.adaptToSingle(o, clazz);
26         }
27
28         /**
29          * Adapts given object to collection of objects of given class.
30          * @param o
31          * @param clazz
32          * @return collection of objects of given class. 
33          */
34         public static <T> Collection<T> adaptToCollection(Object o, Class<T> clazz) {
35                 return org.simantics.utils.ui.AdaptionUtils.adaptToCollection(o, clazz);
36         }
37
38         public static <T> Collection<T> adaptToCollection(Object arr[], Class<T> clazz) {
39                 return org.simantics.utils.ui.AdaptionUtils.adaptToCollection(arr, clazz);
40         }
41
42 }