X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=blobdiff_plain;f=opendaylight%2Fmd-sal%2Fsal-rest-connector%2Fsrc%2Ftest%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fsal%2Frestconf%2Fimpl%2Ftest%2Fstructures%2FLst.java;h=8eccf373b9e3b8fd40283517303540517412b97d;hp=56928e81e9d8ebdd15ec2442b576f0e1c0f7af3f;hb=78527e81f8cc82140af5cb2649863a597f380291;hpb=7e9c91c57da1cac389e8234b738219a5fe671c36 diff --git a/opendaylight/md-sal/sal-rest-connector/src/test/java/org/opendaylight/controller/sal/restconf/impl/test/structures/Lst.java b/opendaylight/md-sal/sal-rest-connector/src/test/java/org/opendaylight/controller/sal/restconf/impl/test/structures/Lst.java index 56928e81e9..8eccf373b9 100644 --- a/opendaylight/md-sal/sal-rest-connector/src/test/java/org/opendaylight/controller/sal/restconf/impl/test/structures/Lst.java +++ b/opendaylight/md-sal/sal-rest-connector/src/test/java/org/opendaylight/controller/sal/restconf/impl/test/structures/Lst.java @@ -1,16 +1,24 @@ +/* + * Copyright (c) 2014 Cisco Systems, Inc. and others. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v1.0 which accompanies this distribution, + * and is available at http://www.eclipse.org/legal/epl-v10.html + */ package org.opendaylight.controller.sal.restconf.impl.test.structures; -import java.util.*; +import java.util.HashSet; +import java.util.Set; public class Lst extends YangElement { - private Set lstItems; + private final Set lstItems; - public Lst(String name) { + public Lst(final String name) { super(name); lstItems = new HashSet<>(); } - public Lst addLstItem(LstItem lstItem) { + public Lst addLstItem(final LstItem lstItem) { lstItem.setLstName(name); while (this.lstItems.contains(lstItem)) { lstItem.incNumOfEqualItems(); @@ -24,7 +32,7 @@ public class Lst extends YangElement { } @Override - public boolean equals(Object obj) { + public boolean equals(final Object obj) { if (this == obj) { return true; } @@ -52,5 +60,4 @@ public class Lst extends YangElement { result = prime * result + ((lstItems == null) ? 0 : lstItems.hashCode()); return result; } - }