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

项目:jdk8u-jdk    文件:StreamFlagsTest.java   
public void testBaseStreams() {
    Stream<String> arrayList = new ArrayList<String>().stream();
    Stream<String> linkedList = new LinkedList<String>().stream();
    Stream<String> hashSet = new HashSet<String>().stream();
    Stream<String> treeSet = new TreeSet<String>().stream();
    Stream<String> linkedHashSet = new LinkedHashSet<String>().stream();
    Stream<String> repeat = Stream.generate(() -> "");

    assertFlags(OpTestCase.getStreamFlags(arrayList),
                EnumSet.of(ORDERED, SIZED),
                EnumSet.of(DISTINCT, SORTED, SHORT_CIRCUIT));
    assertFlags(OpTestCase.getStreamFlags(linkedList),
                EnumSet.of(ORDERED, SIZED),
                EnumSet.of(DISTINCT, SORTED, SHORT_CIRCUIT));
    assertFlags(OpTestCase.getStreamFlags(hashSet),
                EnumSet.of(SIZED, DISTINCT),
                EnumSet.of(ORDERED, SORTED, SHORT_CIRCUIT));
    assertFlags(OpTestCase.getStreamFlags(treeSet),
                EnumSet.of(ORDERED, SIZED, DISTINCT, SORTED),
                EnumSet.of(SHORT_CIRCUIT));
    assertFlags(OpTestCase.getStreamFlags(linkedHashSet),
                EnumSet.of(ORDERED, DISTINCT, SIZED),
                EnumSet.of(SORTED, SHORT_CIRCUIT));
    assertFlags(OpTestCase.getStreamFlags(repeat),
                EnumSet.noneOf(StreamOpFlag.class),
                EnumSet.of(DISTINCT, SORTED, SHORT_CIRCUIT));
}
项目:openjdk-jdk10    文件:StreamFlagsTest.java   
public void testBaseStreams() {
    Stream<String> arrayList = new ArrayList<String>().stream();
    Stream<String> linkedList = new LinkedList<String>().stream();
    Stream<String> hashSet = new HashSet<String>().stream();
    Stream<String> treeSet = new TreeSet<String>().stream();
    Stream<String> linkedHashSet = new LinkedHashSet<String>().stream();
    Stream<String> repeat = Stream.generate(() -> "");

    assertFlags(OpTestCase.getStreamFlags(arrayList),
                EnumSet.of(ORDERED, SIZED),
                EnumSet.of(DISTINCT, SORTED, SHORT_CIRCUIT));
    assertFlags(OpTestCase.getStreamFlags(linkedList),
                EnumSet.of(ORDERED, SIZED),
                EnumSet.of(DISTINCT, SORTED, SHORT_CIRCUIT));
    assertFlags(OpTestCase.getStreamFlags(hashSet),
                EnumSet.of(SIZED, DISTINCT),
                EnumSet.of(ORDERED, SORTED, SHORT_CIRCUIT));
    assertFlags(OpTestCase.getStreamFlags(treeSet),
                EnumSet.of(ORDERED, SIZED, DISTINCT, SORTED),
                EnumSet.of(SHORT_CIRCUIT));
    assertFlags(OpTestCase.getStreamFlags(linkedHashSet),
                EnumSet.of(ORDERED, DISTINCT, SIZED),
                EnumSet.of(SORTED, SHORT_CIRCUIT));
    assertFlags(OpTestCase.getStreamFlags(repeat),
                EnumSet.noneOf(StreamOpFlag.class),
                EnumSet.of(DISTINCT, SORTED, SHORT_CIRCUIT));
}
项目:openjdk9    文件:StreamFlagsTest.java   
public void testBaseStreams() {
    Stream<String> arrayList = new ArrayList<String>().stream();
    Stream<String> linkedList = new LinkedList<String>().stream();
    Stream<String> hashSet = new HashSet<String>().stream();
    Stream<String> treeSet = new TreeSet<String>().stream();
    Stream<String> linkedHashSet = new LinkedHashSet<String>().stream();
    Stream<String> repeat = Stream.generate(() -> "");

    assertFlags(OpTestCase.getStreamFlags(arrayList),
                EnumSet.of(ORDERED, SIZED),
                EnumSet.of(DISTINCT, SORTED, SHORT_CIRCUIT));
    assertFlags(OpTestCase.getStreamFlags(linkedList),
                EnumSet.of(ORDERED, SIZED),
                EnumSet.of(DISTINCT, SORTED, SHORT_CIRCUIT));
    assertFlags(OpTestCase.getStreamFlags(hashSet),
                EnumSet.of(SIZED, DISTINCT),
                EnumSet.of(ORDERED, SORTED, SHORT_CIRCUIT));
    assertFlags(OpTestCase.getStreamFlags(treeSet),
                EnumSet.of(ORDERED, SIZED, DISTINCT, SORTED),
                EnumSet.of(SHORT_CIRCUIT));
    assertFlags(OpTestCase.getStreamFlags(linkedHashSet),
                EnumSet.of(ORDERED, DISTINCT, SIZED),
                EnumSet.of(SORTED, SHORT_CIRCUIT));
    assertFlags(OpTestCase.getStreamFlags(repeat),
                EnumSet.noneOf(StreamOpFlag.class),
                EnumSet.of(DISTINCT, SORTED, SHORT_CIRCUIT));
}
项目:jdk8u_jdk    文件:StreamFlagsTest.java   
public void testBaseStreams() {
    Stream<String> arrayList = new ArrayList<String>().stream();
    Stream<String> linkedList = new LinkedList<String>().stream();
    Stream<String> hashSet = new HashSet<String>().stream();
    Stream<String> treeSet = new TreeSet<String>().stream();
    Stream<String> linkedHashSet = new LinkedHashSet<String>().stream();
    Stream<String> repeat = Stream.generate(() -> "");

    assertFlags(OpTestCase.getStreamFlags(arrayList),
                EnumSet.of(ORDERED, SIZED),
                EnumSet.of(DISTINCT, SORTED, SHORT_CIRCUIT));
    assertFlags(OpTestCase.getStreamFlags(linkedList),
                EnumSet.of(ORDERED, SIZED),
                EnumSet.of(DISTINCT, SORTED, SHORT_CIRCUIT));
    assertFlags(OpTestCase.getStreamFlags(hashSet),
                EnumSet.of(SIZED, DISTINCT),
                EnumSet.of(ORDERED, SORTED, SHORT_CIRCUIT));
    assertFlags(OpTestCase.getStreamFlags(treeSet),
                EnumSet.of(ORDERED, SIZED, DISTINCT, SORTED),
                EnumSet.of(SHORT_CIRCUIT));
    assertFlags(OpTestCase.getStreamFlags(linkedHashSet),
                EnumSet.of(ORDERED, DISTINCT, SIZED),
                EnumSet.of(SORTED, SHORT_CIRCUIT));
    assertFlags(OpTestCase.getStreamFlags(repeat),
                EnumSet.noneOf(StreamOpFlag.class),
                EnumSet.of(DISTINCT, SORTED, SHORT_CIRCUIT));
}
项目:lookaside_java-1.8.0-openjdk    文件:StreamFlagsTest.java   
public void testBaseStreams() {
    Stream<String> arrayList = new ArrayList<String>().stream();
    Stream<String> linkedList = new LinkedList<String>().stream();
    Stream<String> hashSet = new HashSet<String>().stream();
    Stream<String> treeSet = new TreeSet<String>().stream();
    Stream<String> linkedHashSet = new LinkedHashSet<String>().stream();
    Stream<String> repeat = Stream.generate(() -> "");

    assertFlags(OpTestCase.getStreamFlags(arrayList),
                EnumSet.of(ORDERED, SIZED),
                EnumSet.of(DISTINCT, SORTED, SHORT_CIRCUIT));
    assertFlags(OpTestCase.getStreamFlags(linkedList),
                EnumSet.of(ORDERED, SIZED),
                EnumSet.of(DISTINCT, SORTED, SHORT_CIRCUIT));
    assertFlags(OpTestCase.getStreamFlags(hashSet),
                EnumSet.of(SIZED, DISTINCT),
                EnumSet.of(ORDERED, SORTED, SHORT_CIRCUIT));
    assertFlags(OpTestCase.getStreamFlags(treeSet),
                EnumSet.of(ORDERED, SIZED, DISTINCT, SORTED),
                EnumSet.of(SHORT_CIRCUIT));
    assertFlags(OpTestCase.getStreamFlags(linkedHashSet),
                EnumSet.of(ORDERED, DISTINCT, SIZED),
                EnumSet.of(SORTED, SHORT_CIRCUIT));
    assertFlags(OpTestCase.getStreamFlags(repeat),
                EnumSet.noneOf(StreamOpFlag.class),
                EnumSet.of(DISTINCT, SORTED, SHORT_CIRCUIT));
}
项目:infobip-open-jdk-8    文件:StreamFlagsTest.java   
public void testBaseStreams() {
    Stream<String> arrayList = new ArrayList<String>().stream();
    Stream<String> linkedList = new LinkedList<String>().stream();
    Stream<String> hashSet = new HashSet<String>().stream();
    Stream<String> treeSet = new TreeSet<String>().stream();
    Stream<String> linkedHashSet = new LinkedHashSet<String>().stream();
    Stream<String> repeat = Stream.generate(() -> "");

    assertFlags(OpTestCase.getStreamFlags(arrayList),
                EnumSet.of(ORDERED, SIZED),
                EnumSet.of(DISTINCT, SORTED, SHORT_CIRCUIT));
    assertFlags(OpTestCase.getStreamFlags(linkedList),
                EnumSet.of(ORDERED, SIZED),
                EnumSet.of(DISTINCT, SORTED, SHORT_CIRCUIT));
    assertFlags(OpTestCase.getStreamFlags(hashSet),
                EnumSet.of(SIZED, DISTINCT),
                EnumSet.of(ORDERED, SORTED, SHORT_CIRCUIT));
    assertFlags(OpTestCase.getStreamFlags(treeSet),
                EnumSet.of(ORDERED, SIZED, DISTINCT, SORTED),
                EnumSet.of(SHORT_CIRCUIT));
    assertFlags(OpTestCase.getStreamFlags(linkedHashSet),
                EnumSet.of(ORDERED, DISTINCT, SIZED),
                EnumSet.of(SORTED, SHORT_CIRCUIT));
    assertFlags(OpTestCase.getStreamFlags(repeat),
                EnumSet.noneOf(StreamOpFlag.class),
                EnumSet.of(DISTINCT, SORTED, SHORT_CIRCUIT));
}
项目:jdk8u-dev-jdk    文件:StreamFlagsTest.java   
public void testBaseStreams() {
    Stream<String> arrayList = new ArrayList<String>().stream();
    Stream<String> linkedList = new LinkedList<String>().stream();
    Stream<String> hashSet = new HashSet<String>().stream();
    Stream<String> treeSet = new TreeSet<String>().stream();
    Stream<String> linkedHashSet = new LinkedHashSet<String>().stream();
    Stream<String> repeat = Stream.generate(() -> "");

    assertFlags(OpTestCase.getStreamFlags(arrayList),
                EnumSet.of(ORDERED, SIZED),
                EnumSet.of(DISTINCT, SORTED, SHORT_CIRCUIT));
    assertFlags(OpTestCase.getStreamFlags(linkedList),
                EnumSet.of(ORDERED, SIZED),
                EnumSet.of(DISTINCT, SORTED, SHORT_CIRCUIT));
    assertFlags(OpTestCase.getStreamFlags(hashSet),
                EnumSet.of(SIZED, DISTINCT),
                EnumSet.of(ORDERED, SORTED, SHORT_CIRCUIT));
    assertFlags(OpTestCase.getStreamFlags(treeSet),
                EnumSet.of(ORDERED, SIZED, DISTINCT, SORTED),
                EnumSet.of(SHORT_CIRCUIT));
    assertFlags(OpTestCase.getStreamFlags(linkedHashSet),
                EnumSet.of(ORDERED, DISTINCT, SIZED),
                EnumSet.of(SORTED, SHORT_CIRCUIT));
    assertFlags(OpTestCase.getStreamFlags(repeat),
                EnumSet.noneOf(StreamOpFlag.class),
                EnumSet.of(DISTINCT, SORTED, SHORT_CIRCUIT));
}
项目:OLD-OpenJDK8    文件:StreamFlagsTest.java   
public void testBaseStreams() {
    Stream<String> arrayList = new ArrayList<String>().stream();
    Stream<String> linkedList = new LinkedList<String>().stream();
    Stream<String> hashSet = new HashSet<String>().stream();
    Stream<String> treeSet = new TreeSet<String>().stream();
    Stream<String> linkedHashSet = new LinkedHashSet<String>().stream();
    Stream<String> repeat = Stream.generate(() -> "");

    assertFlags(OpTestCase.getStreamFlags(arrayList),
                EnumSet.of(ORDERED, SIZED),
                EnumSet.of(DISTINCT, SORTED, SHORT_CIRCUIT));
    assertFlags(OpTestCase.getStreamFlags(linkedList),
                EnumSet.of(ORDERED, SIZED),
                EnumSet.of(DISTINCT, SORTED, SHORT_CIRCUIT));
    assertFlags(OpTestCase.getStreamFlags(hashSet),
                EnumSet.of(SIZED, DISTINCT),
                EnumSet.of(ORDERED, SORTED, SHORT_CIRCUIT));
    assertFlags(OpTestCase.getStreamFlags(treeSet),
                EnumSet.of(ORDERED, SIZED, DISTINCT, SORTED),
                EnumSet.of(SHORT_CIRCUIT));
    assertFlags(OpTestCase.getStreamFlags(linkedHashSet),
                EnumSet.of(ORDERED, DISTINCT, SIZED),
                EnumSet.of(SORTED, SHORT_CIRCUIT));
    assertFlags(OpTestCase.getStreamFlags(repeat),
                EnumSet.noneOf(StreamOpFlag.class),
                EnumSet.of(DISTINCT, SORTED, SHORT_CIRCUIT));
}