Project

General

Profile

1
package eu.dnetlib.data.hadoop.config;
2

    
3
import java.util.Arrays;
4
import java.util.List;
5

    
6
import com.google.common.base.Function;
7
import com.google.common.collect.Iterables;
8
import com.google.common.collect.Lists;
9

    
10
/**
11
 * Enumeration of the managed clusters.
12
 *
13
 * @author claudio
14
 *
15
 */
16
public enum ClusterName {
17
	DM, // Data Management
18
	DHP, //Dnet Hadoop Cluster
19
	IIS; // Information Inference Service(s)
20

    
21

    
22

    
23
	public static List<String> asStringList() {
24
		return Lists.newArrayList(Iterables.transform(asList(), new Function<ClusterName, String>() {
25

    
26
			@Override
27
			public String apply(final ClusterName clusterName) {
28
				return clusterName.toString();
29
			}
30
		}));
31
	}
32

    
33
	public static List<ClusterName> asList() {
34
		return Arrays.asList(ClusterName.values());
35
	}
36

    
37
}
(1-1/3)