Java EnumSet Usage deepCloneEnumSet(final EnumSet set)

Here you can find the source of deepCloneEnumSet(final EnumSet set)

Description

deepCloneEnumSet

License

Apache License

Parameter

Parameter Description
set a parameter

Declaration

protected static <T> Set<T> deepCloneEnumSet(final EnumSet set) 

Method Source Code

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

import java.util.EnumSet;

import java.util.Set;

public class Main {
    /**//from w  w  w . j  a v  a2 s. c  o  m
     * 
     * deepCloneEnumSet
     * 
     * @param set
     * @return
     */
    protected static <T> Set<T> deepCloneEnumSet(final EnumSet set) {

        if (set == null) {
            return null;
        }

        return set.clone();

    }
}

Related

  1. awaitThreadState(Thread thread, long maxWaitMillis, Thread.State first, Thread.State... rest)
  2. copyOf(Collection src, Class type)
  3. encode(EnumSet set)
  4. extractTypes(final Class type)
  5. findEnumIgnoreCase(Class enumClass, String string, T defValue)
  6. getDataFromEnum(Class enumClass)