]> source.dussan.org Git - poi.git/commitdiff
fix test
authorPJ Fanning <fanningpj@apache.org>
Wed, 29 Dec 2021 13:39:07 +0000 (13:39 +0000)
committerPJ Fanning <fanningpj@apache.org>
Wed, 29 Dec 2021 13:39:07 +0000 (13:39 +0000)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1896507 13f79535-47bb-0310-9956-ffa450edef68

poi/src/main/java/org/apache/poi/ss/formula/functions/LookupUtils.java

index a74901ab2081d06440c2f746dc23736a23203f7c..b8d6f51c83cc7a3a53cf4c39e7fd864e5df2bd3c 100644 (file)
@@ -111,6 +111,7 @@ public final class LookupUtils {
     public interface ValueVector {
         ValueEval getItem(int index);
         int getSize();
+
         default Iterator<Integer> indexIterator() {
             return new Iterator<Integer>() {
                 int pos = 0;
@@ -126,19 +127,14 @@ public final class LookupUtils {
                 }
             };
         }
-        /**
-         * @since POI 5.2.0
-         */
-        default Spliterator<Integer> indexSpliterator() {
-            return Spliterators.spliterator(indexIterator(), getSize(), 0);
-        }
+
         default Iterator<Integer> reverseIndexIterator() {
             return new Iterator<Integer>() {
-                int pos = getSize() - 1;
+                private int pos = getSize() - 1;
 
                 @Override
                 public boolean hasNext() {
-                    return pos >= 0;
+                    return pos > 0;
                 }
 
                 @Override
@@ -149,12 +145,6 @@ public final class LookupUtils {
                 }
             };
         }
-        /**
-         * @since POI 5.2.0
-         */
-        default Spliterator<Integer> reverseIndexSpliterator() {
-            return Spliterators.spliterator(reverseIndexIterator(), getSize(), 0);
-        }
     }
 
     private static final class RowVector implements ValueVector {