2 * Copyright (c) 2014 Cisco Systems, Inc. and others. All rights reserved.
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6 * and is available at http://www.eclipse.org/legal/epl-v10.html
8 package org.opendaylight.controller.sal.restconf.impl.test.structures;
10 import java.util.HashSet;
13 public class LfLst extends YangElement {
16 public LfLst(String name) {
18 lfs = new HashSet<>();
21 public LfLst addLf(Object value) {
22 return addLf(new Lf(value));
25 public LfLst addLf(Lf lf) {
26 while (this.lfs.contains(lf)) {
27 lf.incNumOfEqualItems();
33 public Set<Lf> getLfs() {
38 public boolean equals(Object obj) {
42 if (!this.getClass().equals(obj.getClass())) {
45 if (!super.equals(obj)) {
48 LfLst lfLst = (LfLst) obj;
49 if (this.lfs == null) {
50 if (lfLst.lfs != null) {
53 } else if (!this.lfs.equals(lfLst.lfs)) {
60 public int hashCode() {
62 int result = super.hashCode();
63 result = prime * result + ((lfs == null) ? 0 : lfs.hashCode());
68 public String toString() {
70 return super.toString();