1 package org.opendaylight.controller.sal.restconf.impl.test.structures;
8 Map<String, LfLst> lfLsts;
10 Map<String, Cont> conts;
11 private int numOfEqualItems = 0;
14 lfs = new HashMap<>();
15 conts = new HashMap<>();
16 lfLsts = new HashMap<>();
17 lsts = new HashMap<>();
20 public Map<String, Lst> getLsts() {
24 public Map<String, Cont> getConts() {
28 public Map<String, LfLst> getLfLsts() {
32 public Map<String, Lf> getLfs() {
36 public String getLstName() {
40 public LstItem addLf(Lf lf) {
41 lfs.put(lf.getName(), lf);
45 public LstItem addLf(String name, String value) {
46 lfs.put(name, new Lf(name, value));
50 public void addLfLst(LfLst lfLst) {
51 lfLsts.put(lfLst.getName(), lfLst);
54 public void addLst(Lst lst) {
55 lsts.put(lst.getName(), lst);
58 public void addCont(Cont cont) {
59 conts.put(cont.getName(), cont);
62 public void incNumOfEqualItems() {
63 this.numOfEqualItems++;
67 public boolean equals(Object obj) {
71 if (!this.getClass().equals(obj.getClass())) {
74 LstItem lstItem = (LstItem) obj;
75 if (this.conts == null) {
76 if (lstItem.conts != null) {
79 } else if (!this.conts.equals(lstItem.conts)) {
82 if (this.lfs == null) {
83 if (lstItem.lfs != null) {
86 } else if (!this.lfs.equals(lstItem.lfs)) {
89 if (this.lfLsts == null) {
90 if (lstItem.lfLsts != null) {
93 } else if (!this.lfLsts.equals(lstItem.lfLsts)) {
96 if (this.lsts == null) {
97 if (lstItem.lsts != null) {
100 } else if (!this.lsts.equals(lstItem.lsts)) {
103 if (this.numOfEqualItems != lstItem.numOfEqualItems) {
110 public int hashCode() {
111 final int prime = 31;
113 result = prime * result + ((lfs == null) ? 0 : lfs.hashCode());
114 result = prime * result + ((lfLsts == null) ? 0 : lfLsts.hashCode());
115 result = prime * result + ((lsts == null) ? 0 : lsts.hashCode());
116 result = prime * result + ((conts == null) ? 0 : conts.hashCode());
117 result = prime * result + numOfEqualItems;
122 public String toString() {
123 return "lst item of " + lstName;
126 public void setLstName(String name) {