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

hope.kola.contract.api.Common Maven / Gradle / Ivy

There is a newer version: 1.1.2-RELEASE
Show newest version
package hope.kola.contract.api;

import com.squareup.javapoet.ClassName;
import com.squareup.javapoet.ParameterizedTypeName;
import java.util.*;
import java.util.concurrent.ConcurrentHashMap;

public interface Common {

  ClassName ARRAY_LIST = ClassName.get(ArrayList.class);

  ClassName HASH_MAP = ClassName.get(HashMap.class);

  ClassName LINKED_HASH_MAP = ClassName.get(LinkedHashMap.class);

  ClassName CONCURRENT_HASH_MAP = ClassName.get(ConcurrentHashMap.class);

  default ParameterizedTypeName listOfType(final Class clz) {
    return ParameterizedTypeName.get(List.class, clz);
  }

  default ParameterizedTypeName mapOfType(final Class key, final Class value) {
    return ParameterizedTypeName.get(Map.class, key, value);
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy