ExtractorFactory.java
677 Bytes
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
42
/**
*
*/
package extractors;
import is2.data.Long2IntInterface;
/**
* @author Dr. Bernd Bohnet, 29.04.2011
*
*
*/
public class ExtractorFactory {
public static final int StackedClustered = 4;
public static final int StackedClusteredR2 = 5;
private int type = -1;
/**
* @param stackedClusteredR22
*/
public ExtractorFactory(int t) {
type = t;
}
/**
* @param stackedClusteredR22
* @param l2i
* @return
*/
public Extractor getExtractor(Long2IntInterface l2i) {
switch (type) {
case StackedClustered:
return new ExtractorClusterStacked(l2i);
case StackedClusteredR2:
return new ExtractorClusterStackedR2(l2i);
}
return null;
}
}