summaryrefslogtreecommitdiffstats
path: root/core/sliPluginUtils/provider/src/main/java/org/onap/ccsdk/sli/core/slipluginutils/slitopologyutils/topology/Pnf.java
blob: 749c1d447ff182ba2b5745f6ec79406d44c183eb (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
package org.onap.ccsdk.sli.core.slipluginutils.slitopologyutils.topology;

import org.onap.ccsdk.sli.core.slipluginutils.slitopologyutils.graph.Vertex;

import java.util.Objects;

public class Pnf implements Vertex {

    private final String pnfName;
    public Pnf(String pnfName){
        this.pnfName = pnfName;
    }

    @Override
    public int hashCode(){
        return pnfName.hashCode();
    }

    @Override
    public String toString() {
        return pnfName;
    }

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