Skip to main content
aboutsummaryrefslogtreecommitdiffstats
blob: e5cfcaa2f2ca1c75bebb4fdc0ffca9b603e50c06 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
/*******************************************************************************
 * Copyright (c) 2013 Atos
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *
 * Contributors:
 *     Arthur Daussy - initial implementation
 *******************************************************************************/
package org.eclipse.papyrus.team.collaborative.core.utils.funtions;

import java.io.File;

import org.eclipse.core.resources.IResource;

import com.google.common.base.Function;


/**
 * The Class IFileToFile.
 * Function used to convert {@link IResource} to {@link File}
 *
 * @param <T>
 *            the generic type
 */
public class IFileToFile<T extends IResource> implements Function<T, File> {

	/*
	 * (non-Javadoc)
	 * 
	 * @see com.google.common.base.Function#apply(java.lang.Object)
	 */
	@Override
	public File apply(T from) {
		return from.getFullPath().toFile();
	}



}

Back to the top