Java EnumSet Usage nativeLoadEnumDefaultValues(Class enumType)

Here you can find the source of nativeLoadEnumDefaultValues(Class enumType)

Description

native Load Enum Default Values

License

LGPL

Declaration

public static List<?> nativeLoadEnumDefaultValues(Class<Enum> enumType) 

Method Source Code


//package com.java2s;
//License from project: LGPL 

import java.util.ArrayList;
import java.util.EnumSet;
import java.util.List;

public class Main {
    public static List<?> nativeLoadEnumDefaultValues(Class<Enum> enumType) {
        List<?> result = null;
        EnumSet values = (enumType != null ? EnumSet.allOf(enumType) : null);
        if (values != null) {
            result = new ArrayList();
            result.addAll(values);//  w  w w  . j a v a 2 s. c om
        }
        return result;
    }
}

Related

  1. extractTypes(final Class type)
  2. findEnumIgnoreCase(Class enumClass, String string, T defValue)
  3. getDataFromEnum(Class enumClass)
  4. getDataInEnumClass(String enumClassName)
  5. getEnumFromString(Class enumClass, String enumValue, boolean compareByValue)
  6. nextEnum(T ce)
  7. possibilities(Class enumClass)
  8. rotateEnum(T ce, boolean backwards, EnumSet ValidOptions)
  9. setOnly(EnumSet theSet, E flag)