Examples of CodeListSet


Examples of org.apache.sis.util.collection.CodeListSet

    private <E> Set<E> createSet(final Class<E> elementType, final int capacity) {
        if (Enum.class.isAssignableFrom(elementType)) {
            return EnumSet.noneOf((Class) elementType);
        }
        if (CodeList.class.isAssignableFrom(elementType) && Modifier.isFinal(elementType.getModifiers())) {
            return new CodeListSet((Class) elementType);
        }
        return new CheckedHashSet<E>(elementType, capacity);
    }
View Full Code Here

Examples of org.apache.sis.util.collection.CodeListSet

    private <E> Set<E> createSet(final Class<E> elementType, final int capacity) {
        if (Enum.class.isAssignableFrom(elementType)) {
            return EnumSet.noneOf((Class) elementType);
        }
        if (CodeList.class.isAssignableFrom(elementType) && Modifier.isFinal(elementType.getModifiers())) {
            return new CodeListSet(elementType);
        }
        return new CheckedHashSet<E>(elementType, capacity);
    }
View Full Code Here

Examples of org.apache.sis.util.collection.CodeListSet

     * @return A new set for elements of the given type.
     */
    @SuppressWarnings({"unchecked","rawtypes"})
    public static <E> Set<E> createSetForType(final Class<E> type, final int count) {
        if (CodeList.class.isAssignableFrom(type)) {
            return new CodeListSet((Class) type);
        }
        if (Enum.class.isAssignableFrom(type)) {
            return EnumSet.noneOf((Class) type);
        }
        return new LinkedHashSet<E>(hashMapCapacity(count));
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.