Propagate @Nonnull and @Nullable annotations
[yangtools.git] / yang / yang-data-api / src / main / java / org / opendaylight / yangtools / yang / data / api / StackedPathArguments.java
index ffe52c02c1cdbab0093b66fcc7a09d60870d0f49..690e2a438b3c3f9a32fe3e24fea30255a91caeab 100644 (file)
@@ -1,5 +1,6 @@
 /*
  * Copyright (c) 2015 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
@@ -36,16 +37,15 @@ final class StackedPathArguments extends PathArgumentList {
     }
 
     @Override
-    public final PathArgument get(final int index) {
+    public PathArgument get(final int index) {
         if (index < base.size()) {
             return base.get(index);
-        } else {
-            return stack.get(index - base.size());
         }
+        return stack.get(index - base.size());
     }
 
     @Override
-    public final int indexOf(final Object o) {
+    public int indexOf(final Object o) {
         final PathArgument srch = (PathArgument) Preconditions.checkNotNull(o);
 
         int ret = base.indexOf(srch);
@@ -59,7 +59,7 @@ final class StackedPathArguments extends PathArgumentList {
     }
 
     @Override
-    public final int lastIndexOf(final Object o) {
+    public int lastIndexOf(final Object o) {
         final PathArgument srch = (PathArgument) Preconditions.checkNotNull(o);
 
         final int ret = stack.lastIndexOf(srch);
@@ -70,6 +70,7 @@ final class StackedPathArguments extends PathArgumentList {
         return base.lastIndexOf(srch);
     }
 
+    @Nonnull
     @Override
     public UnmodifiableIterator<PathArgument> iterator() {
         return new IteratorImpl(base, stack);