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 public class Lf extends YangElement {
12 private int numOfEqualItems = 0;
14 public Lf(String name, Object value) {
19 public Lf(Object value) {
24 public Object getValue() {
29 public boolean equals(Object obj) {
33 if (!this.getClass().equals(obj.getClass())) {
36 if (!super.equals(obj)) {
40 if (this.value == null) {
41 if (lf.value != null) {
44 } else if (!this.value.equals(lf.value)) {
47 if (this.numOfEqualItems != lf.numOfEqualItems) {
53 public void incNumOfEqualItems() {
54 this.numOfEqualItems++;
58 public int hashCode() {
60 int result = super.hashCode();
61 result = prime * result + ((value == null) ? 0 : value.hashCode());
62 result = prime * result + numOfEqualItems;
67 public String toString() {
68 return super.toString() + ":" + value;