Java 类java.util.stream.StreamOpFlagTestHelper 实例源码

项目:jdk8u-jdk    文件:TabulatorsTest.java   
@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);
}
项目:jdk8u-jdk    文件:TabulatorsTest.java   
@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);
}
项目:openjdk-jdk10    文件:CollectorsTest.java   
@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);
}
项目:openjdk-jdk10    文件:CollectorsTest.java   
@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);
}
项目:openjdk9    文件:CollectorsTest.java   
@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);
}
项目:openjdk9    文件:CollectorsTest.java   
@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);
}
项目:jdk8u_jdk    文件:TabulatorsTest.java   
@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);
}
项目:jdk8u_jdk    文件:TabulatorsTest.java   
@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);
}
项目:lookaside_java-1.8.0-openjdk    文件:TabulatorsTest.java   
@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);
}
项目:lookaside_java-1.8.0-openjdk    文件:TabulatorsTest.java   
@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);
}
项目:infobip-open-jdk-8    文件:TabulatorsTest.java   
@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);
}
项目:infobip-open-jdk-8    文件:TabulatorsTest.java   
@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);
}
项目:jdk8u-dev-jdk    文件:TabulatorsTest.java   
@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);
}
项目:jdk8u-dev-jdk    文件:TabulatorsTest.java   
@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);
}
项目:OLD-OpenJDK8    文件:TabulatorsTest.java   
@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);
}
项目:OLD-OpenJDK8    文件:TabulatorsTest.java   
@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);
}