Class TypeTokens
- java.lang.Object
-
- org.apache.cassandra.cql3.functions.types.TypeTokens
-
public final class TypeTokens extends java.lang.ObjectUtility methods to createTypeTokeninstances.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <T> com.google.common.reflect.TypeToken<java.util.List<T>>listOf(com.google.common.reflect.TypeToken<T> eltType)Create aTypeTokenthat represents aListwhose elements are of the given type.static <T> com.google.common.reflect.TypeToken<java.util.List<T>>listOf(java.lang.Class<T> eltType)Create aTypeTokenthat represents aListwhose elements are of the given type.static <K,V>
com.google.common.reflect.TypeToken<java.util.Map<K,V>>mapOf(com.google.common.reflect.TypeToken<K> keyType, com.google.common.reflect.TypeToken<V> valueType)Create aTypeTokenthat represents aMapwhose keys and values are of the given key and value types.static <K,V>
com.google.common.reflect.TypeToken<java.util.Map<K,V>>mapOf(java.lang.Class<K> keyType, java.lang.Class<V> valueType)Create aTypeTokenthat represents aMapwhose keys and values are of the given key and value types.static <T> com.google.common.reflect.TypeToken<java.util.Set<T>>setOf(com.google.common.reflect.TypeToken<T> eltType)Create aTypeTokenthat represents aSetwhose elements are of the given type.static <T> com.google.common.reflect.TypeToken<java.util.Set<T>>setOf(java.lang.Class<T> eltType)Create aTypeTokenthat represents aSetwhose elements are of the given type.
-
-
-
Method Detail
-
listOf
public static <T> com.google.common.reflect.TypeToken<java.util.List<T>> listOf(java.lang.Class<T> eltType)
Create aTypeTokenthat represents aListwhose elements are of the given type.- Type Parameters:
T- The list element type.- Parameters:
eltType- The list element type.- Returns:
- A
TypeTokenthat represents aListwhose elements are of the given type.
-
listOf
public static <T> com.google.common.reflect.TypeToken<java.util.List<T>> listOf(com.google.common.reflect.TypeToken<T> eltType)
Create aTypeTokenthat represents aListwhose elements are of the given type.- Type Parameters:
T- The list element type.- Parameters:
eltType- The list element type.- Returns:
- A
TypeTokenthat represents aListwhose elements are of the given type.
-
setOf
public static <T> com.google.common.reflect.TypeToken<java.util.Set<T>> setOf(java.lang.Class<T> eltType)
Create aTypeTokenthat represents aSetwhose elements are of the given type.- Type Parameters:
T- The set element type.- Parameters:
eltType- The set element type.- Returns:
- A
TypeTokenthat represents aSetwhose elements are of the given type.
-
setOf
public static <T> com.google.common.reflect.TypeToken<java.util.Set<T>> setOf(com.google.common.reflect.TypeToken<T> eltType)
Create aTypeTokenthat represents aSetwhose elements are of the given type.- Type Parameters:
T- The set element type.- Parameters:
eltType- The set element type.- Returns:
- A
TypeTokenthat represents aSetwhose elements are of the given type.
-
mapOf
public static <K,V> com.google.common.reflect.TypeToken<java.util.Map<K,V>> mapOf(java.lang.Class<K> keyType, java.lang.Class<V> valueType)Create aTypeTokenthat represents aMapwhose keys and values are of the given key and value types.- Type Parameters:
K- The map key type.V- The map value type- Parameters:
keyType- The map key type.valueType- The map value type- Returns:
- A
TypeTokenthat represents aMapwhose keys and values are of the given key and value types
-
mapOf
public static <K,V> com.google.common.reflect.TypeToken<java.util.Map<K,V>> mapOf(com.google.common.reflect.TypeToken<K> keyType, com.google.common.reflect.TypeToken<V> valueType)Create aTypeTokenthat represents aMapwhose keys and values are of the given key and value types.- Type Parameters:
K- The map key type.V- The map value type- Parameters:
keyType- The map key type.valueType- The map value type- Returns:
- A
TypeTokenthat represents aMapwhose keys and values are of the given key and value types
-
-