java.util.stream.StreamOpFlagTestHelper Java Examples
The following examples show how to use
java.util.stream.StreamOpFlagTestHelper.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: TabulatorsTest.java From jdk8u-jdk with GNU General Public License v2.0 | 5 votes |
@Override void assertValue(Collection<T> value, Supplier<Stream<T>> source, boolean ordered) throws ReflectiveOperationException { if (!clazz.isAssignableFrom(value.getClass())) fail(String.format("Class mismatch in CollectionAssertion: %s, %s", clazz, value.getClass())); Stream<T> stream = source.get(); Collection<T> result = clazz.newInstance(); for (Iterator<T> it = stream.iterator(); it.hasNext(); ) // avoid capturing result::add result.add(it.next()); if (StreamOpFlagTestHelper.isStreamOrdered(stream) && targetOrdered && ordered) assertContents(value, result); else assertContentsUnordered(value, result); }
Example #2
Source File: TabulatorsTest.java From jdk8u-dev-jdk with GNU General Public License v2.0 | 5 votes |
@Override void assertValue(Collection<T> value, Supplier<Stream<T>> source, boolean ordered) throws ReflectiveOperationException { if (!clazz.isAssignableFrom(value.getClass())) fail(String.format("Class mismatch in CollectionAssertion: %s, %s", clazz, value.getClass())); Stream<T> stream = source.get(); Collection<T> result = clazz.newInstance(); for (Iterator<T> it = stream.iterator(); it.hasNext(); ) // avoid capturing result::add result.add(it.next()); if (StreamOpFlagTestHelper.isStreamOrdered(stream) && targetOrdered && ordered) assertContents(value, result); else assertContentsUnordered(value, result); }
Example #3
Source File: TabulatorsTest.java From jdk8u-dev-jdk with GNU General Public License v2.0 | 5 votes |
@Override void assertValue(List<T> value, Supplier<Stream<T>> source, boolean ordered) throws ReflectiveOperationException { if (!List.class.isAssignableFrom(value.getClass())) fail(String.format("Class mismatch in ListAssertion: %s", value.getClass())); Stream<T> stream = source.get(); List<T> result = new ArrayList<>(); for (Iterator<T> it = stream.iterator(); it.hasNext(); ) // avoid capturing result::add result.add(it.next()); if (StreamOpFlagTestHelper.isStreamOrdered(stream) && ordered) assertContents(value, result); else assertContentsUnordered(value, result); }
Example #4
Source File: TabulatorsTest.java From jdk8u-jdk with GNU General Public License v2.0 | 5 votes |
@Override void assertValue(Collection<T> value, Supplier<Stream<T>> source, boolean ordered) throws ReflectiveOperationException { if (!clazz.isAssignableFrom(value.getClass())) fail(String.format("Class mismatch in CollectionAssertion: %s, %s", clazz, value.getClass())); Stream<T> stream = source.get(); Collection<T> result = clazz.newInstance(); for (Iterator<T> it = stream.iterator(); it.hasNext(); ) // avoid capturing result::add result.add(it.next()); if (StreamOpFlagTestHelper.isStreamOrdered(stream) && targetOrdered && ordered) assertContents(value, result); else assertContentsUnordered(value, result); }
Example #5
Source File: TabulatorsTest.java From jdk8u-jdk with GNU General Public License v2.0 | 5 votes |
@Override void assertValue(List<T> value, Supplier<Stream<T>> source, boolean ordered) throws ReflectiveOperationException { if (!List.class.isAssignableFrom(value.getClass())) fail(String.format("Class mismatch in ListAssertion: %s", value.getClass())); Stream<T> stream = source.get(); List<T> result = new ArrayList<>(); for (Iterator<T> it = stream.iterator(); it.hasNext(); ) // avoid capturing result::add result.add(it.next()); if (StreamOpFlagTestHelper.isStreamOrdered(stream) && ordered) assertContents(value, result); else assertContentsUnordered(value, result); }
Example #6
Source File: TabulatorsTest.java From jdk8u_jdk with GNU General Public License v2.0 | 5 votes |
@Override void assertValue(Collection<T> value, Supplier<Stream<T>> source, boolean ordered) throws ReflectiveOperationException { if (!clazz.isAssignableFrom(value.getClass())) fail(String.format("Class mismatch in CollectionAssertion: %s, %s", clazz, value.getClass())); Stream<T> stream = source.get(); Collection<T> result = clazz.newInstance(); for (Iterator<T> it = stream.iterator(); it.hasNext(); ) // avoid capturing result::add result.add(it.next()); if (StreamOpFlagTestHelper.isStreamOrdered(stream) && targetOrdered && ordered) assertContents(value, result); else assertContentsUnordered(value, result); }
Example #7
Source File: TabulatorsTest.java From jdk8u_jdk with GNU General Public License v2.0 | 5 votes |
@Override void assertValue(List<T> value, Supplier<Stream<T>> source, boolean ordered) throws ReflectiveOperationException { if (!List.class.isAssignableFrom(value.getClass())) fail(String.format("Class mismatch in ListAssertion: %s", value.getClass())); Stream<T> stream = source.get(); List<T> result = new ArrayList<>(); for (Iterator<T> it = stream.iterator(); it.hasNext(); ) // avoid capturing result::add result.add(it.next()); if (StreamOpFlagTestHelper.isStreamOrdered(stream) && ordered) assertContents(value, result); else assertContentsUnordered(value, result); }
Example #8
Source File: TabulatorsTest.java From openjdk-8 with GNU General Public License v2.0 | 5 votes |
@Override void assertValue(Collection<T> value, Supplier<Stream<T>> source, boolean ordered) throws ReflectiveOperationException { if (!clazz.isAssignableFrom(value.getClass())) fail(String.format("Class mismatch in CollectionAssertion: %s, %s", clazz, value.getClass())); Stream<T> stream = source.get(); Collection<T> result = clazz.newInstance(); for (Iterator<T> it = stream.iterator(); it.hasNext(); ) // avoid capturing result::add result.add(it.next()); if (StreamOpFlagTestHelper.isStreamOrdered(stream) && targetOrdered && ordered) assertContents(value, result); else assertContentsUnordered(value, result); }
Example #9
Source File: TabulatorsTest.java From openjdk-8 with GNU General Public License v2.0 | 5 votes |
@Override void assertValue(List<T> value, Supplier<Stream<T>> source, boolean ordered) throws ReflectiveOperationException { if (!List.class.isAssignableFrom(value.getClass())) fail(String.format("Class mismatch in ListAssertion: %s", value.getClass())); Stream<T> stream = source.get(); List<T> result = new ArrayList<>(); for (Iterator<T> it = stream.iterator(); it.hasNext(); ) // avoid capturing result::add result.add(it.next()); if (StreamOpFlagTestHelper.isStreamOrdered(stream) && ordered) assertContents(value, result); else assertContentsUnordered(value, result); }
Example #10
Source File: TabulatorsTest.java From openjdk-8-source with GNU General Public License v2.0 | 5 votes |
@Override void assertValue(Collection<T> value, Supplier<Stream<T>> source, boolean ordered) throws ReflectiveOperationException { if (!clazz.isAssignableFrom(value.getClass())) fail(String.format("Class mismatch in CollectionAssertion: %s, %s", clazz, value.getClass())); Stream<T> stream = source.get(); Collection<T> result = clazz.newInstance(); for (Iterator<T> it = stream.iterator(); it.hasNext(); ) // avoid capturing result::add result.add(it.next()); if (StreamOpFlagTestHelper.isStreamOrdered(stream) && targetOrdered && ordered) assertContents(value, result); else assertContentsUnordered(value, result); }
Example #11
Source File: TabulatorsTest.java From openjdk-8-source with GNU General Public License v2.0 | 5 votes |
@Override void assertValue(List<T> value, Supplier<Stream<T>> source, boolean ordered) throws ReflectiveOperationException { if (!List.class.isAssignableFrom(value.getClass())) fail(String.format("Class mismatch in ListAssertion: %s", value.getClass())); Stream<T> stream = source.get(); List<T> result = new ArrayList<>(); for (Iterator<T> it = stream.iterator(); it.hasNext(); ) // avoid capturing result::add result.add(it.next()); if (StreamOpFlagTestHelper.isStreamOrdered(stream) && ordered) assertContents(value, result); else assertContentsUnordered(value, result); }
Example #12
Source File: TabulatorsTest.java From hottub with GNU General Public License v2.0 | 5 votes |
@Override void assertValue(Collection<T> value, Supplier<Stream<T>> source, boolean ordered) throws ReflectiveOperationException { if (!clazz.isAssignableFrom(value.getClass())) fail(String.format("Class mismatch in CollectionAssertion: %s, %s", clazz, value.getClass())); Stream<T> stream = source.get(); Collection<T> result = clazz.newInstance(); for (Iterator<T> it = stream.iterator(); it.hasNext(); ) // avoid capturing result::add result.add(it.next()); if (StreamOpFlagTestHelper.isStreamOrdered(stream) && targetOrdered && ordered) assertContents(value, result); else assertContentsUnordered(value, result); }
Example #13
Source File: TabulatorsTest.java From hottub with GNU General Public License v2.0 | 5 votes |
@Override void assertValue(List<T> value, Supplier<Stream<T>> source, boolean ordered) throws ReflectiveOperationException { if (!List.class.isAssignableFrom(value.getClass())) fail(String.format("Class mismatch in ListAssertion: %s", value.getClass())); Stream<T> stream = source.get(); List<T> result = new ArrayList<>(); for (Iterator<T> it = stream.iterator(); it.hasNext(); ) // avoid capturing result::add result.add(it.next()); if (StreamOpFlagTestHelper.isStreamOrdered(stream) && ordered) assertContents(value, result); else assertContentsUnordered(value, result); }
Example #14
Source File: TabulatorsTest.java From dragonwell8_jdk with GNU General Public License v2.0 | 5 votes |
@Override void assertValue(List<T> value, Supplier<Stream<T>> source, boolean ordered) throws ReflectiveOperationException { if (!List.class.isAssignableFrom(value.getClass())) fail(String.format("Class mismatch in ListAssertion: %s", value.getClass())); Stream<T> stream = source.get(); List<T> result = new ArrayList<>(); for (Iterator<T> it = stream.iterator(); it.hasNext(); ) // avoid capturing result::add result.add(it.next()); if (StreamOpFlagTestHelper.isStreamOrdered(stream) && ordered) assertContents(value, result); else assertContentsUnordered(value, result); }
Example #15
Source File: TabulatorsTest.java From jdk8u-jdk with GNU General Public License v2.0 | 5 votes |
@Override void assertValue(List<T> value, Supplier<Stream<T>> source, boolean ordered) throws ReflectiveOperationException { if (!List.class.isAssignableFrom(value.getClass())) fail(String.format("Class mismatch in ListAssertion: %s", value.getClass())); Stream<T> stream = source.get(); List<T> result = new ArrayList<>(); for (Iterator<T> it = stream.iterator(); it.hasNext(); ) // avoid capturing result::add result.add(it.next()); if (StreamOpFlagTestHelper.isStreamOrdered(stream) && ordered) assertContents(value, result); else assertContentsUnordered(value, result); }
Example #16
Source File: CollectorsTest.java From openjdk-jdk9 with GNU General Public License v2.0 | 5 votes |
@Override void assertValue(Collection<T> value, Supplier<Stream<T>> source, boolean ordered) throws ReflectiveOperationException { if (!clazz.isAssignableFrom(value.getClass())) fail(String.format("Class mismatch in ToCollectionAssertion: %s, %s", clazz, value.getClass())); Stream<T> stream = source.get(); Collection<T> result = clazz.newInstance(); for (Iterator<T> it = stream.iterator(); it.hasNext(); ) // avoid capturing result::add result.add(it.next()); if (StreamOpFlagTestHelper.isStreamOrdered(stream) && targetOrdered && ordered) assertContents(value, result); else assertContentsUnordered(value, result); }
Example #17
Source File: CollectorsTest.java From openjdk-jdk9 with GNU General Public License v2.0 | 5 votes |
@Override void assertValue(List<T> value, Supplier<Stream<T>> source, boolean ordered) throws ReflectiveOperationException { if (!List.class.isAssignableFrom(value.getClass())) fail(String.format("Class mismatch in ToListAssertion: %s", value.getClass())); Stream<T> stream = source.get(); List<T> result = new ArrayList<>(); for (Iterator<T> it = stream.iterator(); it.hasNext(); ) // avoid capturing result::add result.add(it.next()); if (StreamOpFlagTestHelper.isStreamOrdered(stream) && ordered) assertContents(value, result); else assertContentsUnordered(value, result); }
Example #18
Source File: TabulatorsTest.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 5 votes |
@Override void assertValue(Collection<T> value, Supplier<Stream<T>> source, boolean ordered) throws ReflectiveOperationException { if (!clazz.isAssignableFrom(value.getClass())) fail(String.format("Class mismatch in CollectionAssertion: %s, %s", clazz, value.getClass())); Stream<T> stream = source.get(); Collection<T> result = clazz.newInstance(); for (Iterator<T> it = stream.iterator(); it.hasNext(); ) // avoid capturing result::add result.add(it.next()); if (StreamOpFlagTestHelper.isStreamOrdered(stream) && targetOrdered && ordered) assertContents(value, result); else assertContentsUnordered(value, result); }
Example #19
Source File: TabulatorsTest.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 5 votes |
@Override void assertValue(List<T> value, Supplier<Stream<T>> source, boolean ordered) throws ReflectiveOperationException { if (!List.class.isAssignableFrom(value.getClass())) fail(String.format("Class mismatch in ListAssertion: %s", value.getClass())); Stream<T> stream = source.get(); List<T> result = new ArrayList<>(); for (Iterator<T> it = stream.iterator(); it.hasNext(); ) // avoid capturing result::add result.add(it.next()); if (StreamOpFlagTestHelper.isStreamOrdered(stream) && ordered) assertContents(value, result); else assertContentsUnordered(value, result); }
Example #20
Source File: TabulatorsTest.java From openjdk-jdk8u with GNU General Public License v2.0 | 5 votes |
@Override void assertValue(Collection<T> value, Supplier<Stream<T>> source, boolean ordered) throws ReflectiveOperationException { if (!clazz.isAssignableFrom(value.getClass())) fail(String.format("Class mismatch in CollectionAssertion: %s, %s", clazz, value.getClass())); Stream<T> stream = source.get(); Collection<T> result = clazz.newInstance(); for (Iterator<T> it = stream.iterator(); it.hasNext(); ) // avoid capturing result::add result.add(it.next()); if (StreamOpFlagTestHelper.isStreamOrdered(stream) && targetOrdered && ordered) assertContents(value, result); else assertContentsUnordered(value, result); }
Example #21
Source File: TabulatorsTest.java From openjdk-jdk8u with GNU General Public License v2.0 | 5 votes |
@Override void assertValue(List<T> value, Supplier<Stream<T>> source, boolean ordered) throws ReflectiveOperationException { if (!List.class.isAssignableFrom(value.getClass())) fail(String.format("Class mismatch in ListAssertion: %s", value.getClass())); Stream<T> stream = source.get(); List<T> result = new ArrayList<>(); for (Iterator<T> it = stream.iterator(); it.hasNext(); ) // avoid capturing result::add result.add(it.next()); if (StreamOpFlagTestHelper.isStreamOrdered(stream) && ordered) assertContents(value, result); else assertContentsUnordered(value, result); }
Example #22
Source File: TabulatorsTest.java From jdk8u60 with GNU General Public License v2.0 | 5 votes |
@Override void assertValue(Collection<T> value, Supplier<Stream<T>> source, boolean ordered) throws ReflectiveOperationException { if (!clazz.isAssignableFrom(value.getClass())) fail(String.format("Class mismatch in CollectionAssertion: %s, %s", clazz, value.getClass())); Stream<T> stream = source.get(); Collection<T> result = clazz.newInstance(); for (Iterator<T> it = stream.iterator(); it.hasNext(); ) // avoid capturing result::add result.add(it.next()); if (StreamOpFlagTestHelper.isStreamOrdered(stream) && targetOrdered && ordered) assertContents(value, result); else assertContentsUnordered(value, result); }
Example #23
Source File: TabulatorsTest.java From jdk8u60 with GNU General Public License v2.0 | 5 votes |
@Override void assertValue(List<T> value, Supplier<Stream<T>> source, boolean ordered) throws ReflectiveOperationException { if (!List.class.isAssignableFrom(value.getClass())) fail(String.format("Class mismatch in ListAssertion: %s", value.getClass())); Stream<T> stream = source.get(); List<T> result = new ArrayList<>(); for (Iterator<T> it = stream.iterator(); it.hasNext(); ) // avoid capturing result::add result.add(it.next()); if (StreamOpFlagTestHelper.isStreamOrdered(stream) && ordered) assertContents(value, result); else assertContentsUnordered(value, result); }
Example #24
Source File: TabulatorsTest.java From TencentKona-8 with GNU General Public License v2.0 | 5 votes |
@Override void assertValue(Collection<T> value, Supplier<Stream<T>> source, boolean ordered) throws ReflectiveOperationException { if (!clazz.isAssignableFrom(value.getClass())) fail(String.format("Class mismatch in CollectionAssertion: %s, %s", clazz, value.getClass())); Stream<T> stream = source.get(); Collection<T> result = clazz.newInstance(); for (Iterator<T> it = stream.iterator(); it.hasNext(); ) // avoid capturing result::add result.add(it.next()); if (StreamOpFlagTestHelper.isStreamOrdered(stream) && targetOrdered && ordered) assertContents(value, result); else assertContentsUnordered(value, result); }
Example #25
Source File: TabulatorsTest.java From TencentKona-8 with GNU General Public License v2.0 | 5 votes |
@Override void assertValue(List<T> value, Supplier<Stream<T>> source, boolean ordered) throws ReflectiveOperationException { if (!List.class.isAssignableFrom(value.getClass())) fail(String.format("Class mismatch in ListAssertion: %s", value.getClass())); Stream<T> stream = source.get(); List<T> result = new ArrayList<>(); for (Iterator<T> it = stream.iterator(); it.hasNext(); ) // avoid capturing result::add result.add(it.next()); if (StreamOpFlagTestHelper.isStreamOrdered(stream) && ordered) assertContents(value, result); else assertContentsUnordered(value, result); }
Example #26
Source File: TabulatorsTest.java From dragonwell8_jdk with GNU General Public License v2.0 | 5 votes |
@Override void assertValue(Collection<T> value, Supplier<Stream<T>> source, boolean ordered) throws ReflectiveOperationException { if (!clazz.isAssignableFrom(value.getClass())) fail(String.format("Class mismatch in CollectionAssertion: %s, %s", clazz, value.getClass())); Stream<T> stream = source.get(); Collection<T> result = clazz.newInstance(); for (Iterator<T> it = stream.iterator(); it.hasNext(); ) // avoid capturing result::add result.add(it.next()); if (StreamOpFlagTestHelper.isStreamOrdered(stream) && targetOrdered && ordered) assertContents(value, result); else assertContentsUnordered(value, result); }