summaryrefslogtreecommitdiffstats
path: root/core/sliPluginUtils/provider/src/main/java/org/onap/ccsdk/sli/core/slipluginutils/slitopologyutils/topology/PInterface.java
blob: 20aee11a7222794465a4768692ed84a39bf9d6cb (plain)
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
package org.onap.ccsdk.sli.core.slipluginutils.slitopologyutils.topology;

import java.util.Objects;

public class PInterface {

    private final String pnfName;
    private final PInterfaceName pInterfaceName;

    public PInterface(String pnfName, PInterfaceName pInterfaceName){
        this.pnfName = pnfName;
        this.pInterfaceName = pInterfaceName;
    }

    public PInterfaceName pInterfaceName() {
        return pInterfaceName;
    }

    public String pnfName() {
        return pnfName;
    }

    @Override
    public int hashCode(){
        return Objects.hash(pnfName, pInterfaceName);
    }

    @Override
    public boolean equals(Object o){
        if (this == o){
            return true;
        }
        if (o instanceof PInterface){
            final PInterface other = (PInterface) o;
            return Objects.equals(this.pnfName, other.pnfName) &&
                    Objects.equals(this.pInterfaceName, other.pInterfaceName);
        }
        return false;
    }
}