+/*
+ * 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<LstItem> lstItems;
+ private final Set<LstItem> 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();
}
@Override
- public boolean equals(Object obj) {
+ public boolean equals(final Object obj) {
if (this == obj) {
return true;
}
result = prime * result + ((lstItems == null) ? 0 : lstItems.hashCode());
return result;
}
-
}