| Constructor and Description |
|---|
TypeDescriptors() |
public static TypeDescriptor<Boolean> booleans()
TypeDescriptor for Boolean.
This is the equivalent of:
new TypeDescriptor<Boolean>() {};
TypeDescriptor for Booleanpublic static TypeDescriptor<Double> doubles()
TypeDescriptor for Double.
This is the equivalent of:
new TypeDescriptor<Double>() {};
TypeDescriptor for Doublepublic static TypeDescriptor<Float> floats()
TypeDescriptor for Float.
This is the equivalent of:
new TypeDescriptor<Float>() {};
TypeDescriptor for Floatpublic static TypeDescriptor<Integer> integers()
TypeDescriptor for Integer.
This is the equivalent of:
new TypeDescriptor<Integer>() {};
TypeDescriptor for Integerpublic static TypeDescriptor<Long> longs()
TypeDescriptor for Long.
This is the equivalent of:
new TypeDescriptor<Long>() {};
TypeDescriptor for Longpublic static TypeDescriptor<Short> shorts()
TypeDescriptor for Short.
This is the equivalent of:
new TypeDescriptor<Short>() {};
TypeDescriptor for Shortpublic static TypeDescriptor<BigDecimal> bigdecimals()
TypeDescriptor for BigDecimal.
This is the equivalent of:
new TypeDescriptor<BigDecimal>() {};
TypeDescriptor for BigDecimalpublic static TypeDescriptor<BigInteger> bigintegers()
TypeDescriptor for BigInteger.
This is the equivalent of:
new TypeDescriptor<BigInteger>() {};
TypeDescriptor for BigIntegerpublic static TypeDescriptor<String> strings()
TypeDescriptor for String.
This is the equivalent of:
new TypeDescriptor<String>() {};
TypeDescriptor for Stringpublic static TypeDescriptor<Void> nulls()
TypeDescriptor for nulls/Void.
This is the equivalent of:
new TypeDescriptor<Void>() {};
TypeDescriptor for nulls/Voidpublic static <K,V> TypeDescriptor<KV<K,V>> kvs(TypeDescriptor<K> key, TypeDescriptor<V> value)
TypeDescriptor for KV.
This is the equivalent of:
new TypeDescriptor<KV<K,V>>() {};
Example of use:
PCollection<String> words = ...;
PCollection<KV<String, String>> words = words.apply(
FlatMapElements.via(...)
.withOutputType(
TypeDescriptors.kv(TypeDescriptors.strings(), TypeDescriptors.strings())));
key - The TypeDescriptor for the keyvalue - The TypeDescriptor for the valueTypeDescriptor for KVpublic static <T> TypeDescriptor<Set<T>> sets(TypeDescriptor<T> element)
TypeDescriptor for Set.
This is the equivalent of:
new TypeDescriptor<Set<E>>() {};
Example of use:
PCollection<String> words = ...;
PCollection<Set<String>> words = words.apply(
FlatMapElements.via(...)
.withOutputType(TypeDescriptors.sets(TypeDescriptors.strings())));
element - The TypeDescriptor for the setTypeDescriptor for Setpublic static <T> TypeDescriptor<List<T>> lists(TypeDescriptor<T> element)
TypeDescriptor for List.
This is the equivalent of:
new TypeDescriptor<List<E>>() {};
Example of use:
PCollection<String> words = ...;
PCollection<List<String>> words = words.apply(
FlatMapElements.via(...)
.withOutputType(TypeDescriptors.lists(TypeDescriptors.strings())));
element - The TypeDescriptor for the listTypeDescriptor for Listpublic static <T> TypeDescriptor<Iterable<T>> iterables(TypeDescriptor<T> iterable)
TypeDescriptor for Iterable.
This is the equivalent of:
new TypeDescriptor<Iterable<E>>() {};
Example of use:
PCollection<String> words = ...;
PCollection<Iterable<String>> words = words.apply(
FlatMapElements.via(...)
.withOutputType(TypeDescriptors.iterables(TypeDescriptors.strings())));
iterable - The TypeDescriptor for the iterableTypeDescriptor for Iterable