diff options
author | PJ Fanning <fanningpj@apache.org> | 2021-12-29 13:39:07 +0000 |
---|---|---|
committer | PJ Fanning <fanningpj@apache.org> | 2021-12-29 13:39:07 +0000 |
commit | 2e52cb7452dae78ae4a0450ab939c3c29679a15d (patch) | |
tree | 7ca2f757a7b38364e688130e60097d90ebbcbae9 /poi | |
parent | 6784dd81c2abc907e98e49450f39e9475ffb09b0 (diff) | |
download | poi-2e52cb7452dae78ae4a0450ab939c3c29679a15d.tar.gz poi-2e52cb7452dae78ae4a0450ab939c3c29679a15d.zip |
fix test
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1896507 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'poi')
-rw-r--r-- | poi/src/main/java/org/apache/poi/ss/formula/functions/LookupUtils.java | 18 |
1 files changed, 4 insertions, 14 deletions
diff --git a/poi/src/main/java/org/apache/poi/ss/formula/functions/LookupUtils.java b/poi/src/main/java/org/apache/poi/ss/formula/functions/LookupUtils.java index a74901ab20..b8d6f51c83 100644 --- a/poi/src/main/java/org/apache/poi/ss/formula/functions/LookupUtils.java +++ b/poi/src/main/java/org/apache/poi/ss/formula/functions/LookupUtils.java @@ -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 { |