All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.landawn.abacus.util.Clazz Maven / Gradle / Ivy

There is a newer version: 1.8.1
Show newest version
package com.landawn.abacus.util;

import java.util.ArrayDeque;
import java.util.Deque;
import java.util.LinkedHashMap;
import java.util.LinkedHashSet;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import java.util.NavigableMap;
import java.util.NavigableSet;
import java.util.PriorityQueue;
import java.util.Queue;
import java.util.Set;
import java.util.SortedMap;
import java.util.SortedSet;
import java.util.TreeMap;
import java.util.TreeSet;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ConcurrentLinkedQueue;
import java.util.concurrent.ConcurrentMap;
import java.util.concurrent.LinkedBlockingQueue;

public final class Clazz {

    @SuppressWarnings("rawtypes")
    public static final Class> PROPS_MAP = (Class) Map.class;

    private Clazz() {
        // singleton.
    }

    @SuppressWarnings("rawtypes")
    public static  Class> ofList(final Class eleCls) {
        return (Class) List.class;
    }

    @SuppressWarnings("rawtypes")
    public static  Class> ofLinkedList(final Class eleCls) {
        return (Class) LinkedList.class;
    }

    @SuppressWarnings("rawtypes")
    public static  Class> ofSet(final Class eleCls) {
        return (Class) Set.class;
    }

    @SuppressWarnings("rawtypes")
    public static  Class> ofLinkedHashSet(final Class eleCls) {
        return (Class) LinkedHashSet.class;
    }

    @SuppressWarnings("rawtypes")
    public static  Class> ofSortedSet(final Class eleCls) {
        return (Class) SortedSet.class;
    }

    @SuppressWarnings("rawtypes")
    public static  Class> ofNavigableSet(final Class eleCls) {
        return (Class) NavigableSet.class;
    }

    @SuppressWarnings("rawtypes")
    public static  Class> ofTreeSet(final Class eleCls) {
        return (Class) TreeSet.class;
    }

    @SuppressWarnings("rawtypes")
    public static  Class> ofQueue(final Class eleCls) {
        return (Class) Queue.class;
    }

    @SuppressWarnings("rawtypes")
    public static  Class> ofDeque(final Class eleCls) {
        return (Class) Deque.class;
    }

    @SuppressWarnings("rawtypes")
    public static  Class> ofArrayDeque(final Class eleCls) {
        return (Class) ArrayDeque.class;
    }

    @SuppressWarnings("rawtypes")
    public static  Class> ofLinkedBlockingQueue(final Class eleCls) {
        return (Class) LinkedBlockingQueue.class;
    }

    @SuppressWarnings("rawtypes")
    public static  Class> ofConcurrentLinkedQueue(final Class eleCls) {
        return (Class) ConcurrentLinkedQueue.class;
    }

    @SuppressWarnings("rawtypes")
    public static  Class> ofPriorityQueue(final Class eleCls) {
        return (Class) PriorityQueue.class;
    }

    @SuppressWarnings("rawtypes")
    public static  Class> ofMap(final Class keyCls, final Class valueCls) {
        return (Class) Map.class;
    }

    @SuppressWarnings("rawtypes")
    public static  Class> ofLinkedHashMap(final Class keyCls, final Class valueCls) {
        return (Class) LinkedHashMap.class;
    }

    @SuppressWarnings("rawtypes")
    public static  Class> ofSortedMap(final Class keyCls, final Class valueCls) {
        return (Class) SortedMap.class;
    }

    @SuppressWarnings("rawtypes")
    public static  Class> ofNavigableMap(final Class keyCls, final Class valueCls) {
        return (Class) NavigableMap.class;
    }

    @SuppressWarnings("rawtypes")
    public static  Class> ofTreeMap(final Class keyCls, final Class valueCls) {
        return (Class) TreeMap.class;
    }

    @SuppressWarnings("rawtypes")
    public static  Class> ofConcurrentMap(final Class keyCls, final Class valueCls) {
        return (Class) ConcurrentMap.class;
    }

    @SuppressWarnings("rawtypes")
    public static  Class> ofConcurrentHashMap(final Class keyCls, final Class valueCls) {
        return (Class) ConcurrentHashMap.class;
    }

    @SuppressWarnings("rawtypes")
    public static  Class> ofBiMap(final Class keyCls, final Class valueCls) {
        return (Class) BiMap.class;
    }

    @SuppressWarnings("rawtypes")
    public static  Class> ofMultiset(final Class eleCls) {
        return (Class) Multiset.class;
    }

    @SuppressWarnings("rawtypes")
    public static  Class> ofLongMultiset(final Class eleCls) {
        return (Class) LongMultiset.class;
    }

    @SuppressWarnings("rawtypes")
    public static  Class> ofListMultimap(final Class keyCls, final Class valueEleCls) {
        return (Class) ListMultimap.class;
    }

    @SuppressWarnings("rawtypes")
    public static  Class> ofSetMultimap(final Class keyCls, final Class valueEleCls) {
        return (Class) SetMultimap.class;
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy