Project

General

Profile

1
package eu.dnetlib.dhp.common.java;
2

    
3
import java.util.Map;
4

    
5
import org.apache.commons.lang.NotImplementedException;
6
import org.apache.hadoop.fs.Path;
7

    
8
/**
9
 * Port names (see {@link Ports}) bound to certain paths in the file system
10
 * @author Mateusz Kobos
11
 *
12
 */
13
public class PortBindings {
14
	private final Map<String, Path> input;
15
	private final Map<String, Path> output;
16

    
17
	public PortBindings(Map<String, Path> input, Map<String, Path> output) {
18
		this.input = input;
19
		this.output = output;
20
	}
21
	
22
	public Map<String, Path> getInput() {
23
		return input;
24
	}
25
	
26
	public Map<String, Path> getOutput() {
27
		return output;
28
	}
29
	
30
	@Override
31
	public boolean equals(Object o){
32
		if(!(o instanceof PortBindings)){
33
			return false;
34
		}
35
		PortBindings other = (PortBindings) o;
36
		return input.equals(other.input) && output.equals(other.output);
37
	}
38
	
39
	@Override
40
	public int hashCode(){
41
		throw new NotImplementedException();
42
	}
43
}
(5-5/11)