Project

General

Profile

1
package eu.dnetlib.openaire.directindex.api;
2

    
3
public class IndexDsInfo {
4

    
5
    private final String indexBaseUrl;
6
    private final String indexDsId;
7
    private final String format;
8
    private final String coll;
9

    
10
    public IndexDsInfo(final String indexBaseUrl, final String indexDsId, final String format, final String coll) {
11
        this.indexBaseUrl = indexBaseUrl;
12
        this.indexDsId = indexDsId;
13
        this.format = format;
14
        this.coll = coll;
15
    }
16

    
17
    public String getIndexBaseUrl() {
18
        return indexBaseUrl;
19
    }
20

    
21
    public String getIndexDsId() {
22
        return indexDsId;
23
    }
24

    
25
    public String getFormat() {
26
        return format;
27
    }
28

    
29
    public String getColl() {
30
        return coll;
31
    }
32

    
33
    @Override
34
    public int hashCode() {
35
        return getColl().hashCode();
36
    }
37

    
38
    @Override
39
    public boolean equals(Object other) {
40
        if (!(other instanceof IndexDsInfo)) return false;
41

    
42
        return getColl().equals(((IndexDsInfo) other).getColl());
43
    }
44
}
(4-4/8)