Java Stream of stream(Class clazz)

Here you can find the source of stream(Class clazz)

Description

stream

License

Open Source License

Declaration

public static <T extends Enum<?>> Stream<T> stream(Class<T> clazz) 

Method Source Code


//package com.java2s;
//License from project: Open Source License 

import java.util.Arrays;

import java.util.stream.Stream;

public class Main {
    public static <T extends Enum<?>> Stream<T> stream(Class<T> clazz) {
        return Arrays.stream(clazz.getEnumConstants());
    }/*from w  ww.ja v a2s .  com*/
}

Related

  1. stream(Collection collection)
  2. stream(Enumeration enumeration)
  3. stream(final Iterator iterator)
  4. stream(Iterable iterable)