public class WritableTypeFamily extends Object implements PTypeFamily
Writable
-based implementation of the
PTypeFamily
interface.Modifier and Type | Method and Description |
---|---|
<T> PType<T> |
as(PType<T> ptype)
Returns the equivalent of the given ptype for this family, if it exists.
|
PType<Boolean> |
booleans() |
PType<ByteBuffer> |
bytes() |
<T> PType<Collection<T>> |
collections(PType<T> ptype) |
<S,T> PType<T> |
derived(Class<T> clazz,
MapFn<S,T> inputFn,
MapFn<T,S> outputFn,
PType<S> base) |
<S,T> PType<T> |
derivedImmutable(Class<T> clazz,
MapFn<S,T> inputFn,
MapFn<T,S> outputFn,
PType<S> base)
A derived type whose values are immutable.
|
PType<Double> |
doubles() |
PType<Float> |
floats() |
static WritableTypeFamily |
getInstance() |
PType<Integer> |
ints() |
PType<Long> |
longs() |
<T> PType<Map<String,T>> |
maps(PType<T> ptype) |
PType<Void> |
nulls() |
<V1,V2> PType<Pair<V1,V2>> |
pairs(PType<V1> p1,
PType<V2> p2) |
<V1,V2,V3,V4> |
quads(PType<V1> p1,
PType<V2> p2,
PType<V3> p3,
PType<V4> p4) |
<T> PType<T> |
records(Class<T> clazz) |
PType<String> |
strings() |
<K,V> PTableType<K,V> |
tableOf(PType<K> key,
PType<V> value) |
<V1,V2,V3> PType<Tuple3<V1,V2,V3>> |
triples(PType<V1> p1,
PType<V2> p2,
PType<V3> p3) |
<T extends Tuple> |
tuples(Class<T> clazz,
PType<?>... ptypes) |
PType<TupleN> |
tuples(PType<?>... ptypes) |
PType<Union> |
unionOf(PType<?>... ptypes) |
<W extends org.apache.hadoop.io.Writable> |
writables(Class<W> clazz) |
public static WritableTypeFamily getInstance()
public PType<Void> nulls()
nulls
in interface PTypeFamily
public PType<String> strings()
strings
in interface PTypeFamily
public PType<Long> longs()
longs
in interface PTypeFamily
public PType<Integer> ints()
ints
in interface PTypeFamily
public PType<Float> floats()
floats
in interface PTypeFamily
public PType<Double> doubles()
doubles
in interface PTypeFamily
public PType<Boolean> booleans()
booleans
in interface PTypeFamily
public PType<ByteBuffer> bytes()
bytes
in interface PTypeFamily
public <T> PType<T> records(Class<T> clazz)
records
in interface PTypeFamily
public <K,V> PTableType<K,V> tableOf(PType<K> key, PType<V> value)
tableOf
in interface PTypeFamily
public <V1,V2> PType<Pair<V1,V2>> pairs(PType<V1> p1, PType<V2> p2)
pairs
in interface PTypeFamily
public <V1,V2,V3> PType<Tuple3<V1,V2,V3>> triples(PType<V1> p1, PType<V2> p2, PType<V3> p3)
triples
in interface PTypeFamily
public <V1,V2,V3,V4> PType<Tuple4<V1,V2,V3,V4>> quads(PType<V1> p1, PType<V2> p2, PType<V3> p3, PType<V4> p4)
quads
in interface PTypeFamily
public PType<TupleN> tuples(PType<?>... ptypes)
tuples
in interface PTypeFamily
public <T> PType<Collection<T>> collections(PType<T> ptype)
collections
in interface PTypeFamily
public <T> PType<Map<String,T>> maps(PType<T> ptype)
maps
in interface PTypeFamily
public <T> PType<T> as(PType<T> ptype)
PTypeFamily
as
in interface PTypeFamily
public <T extends Tuple> PType<T> tuples(Class<T> clazz, PType<?>... ptypes)
tuples
in interface PTypeFamily
public <S,T> PType<T> derived(Class<T> clazz, MapFn<S,T> inputFn, MapFn<T,S> outputFn, PType<S> base)
derived
in interface PTypeFamily
public <S,T> PType<T> derivedImmutable(Class<T> clazz, MapFn<S,T> inputFn, MapFn<T,S> outputFn, PType<S> base)
PTypeFamily
derivedImmutable
in interface PTypeFamily
public PType<Union> unionOf(PType<?>... ptypes)
unionOf
in interface PTypeFamily
Copyright © 2017 The Apache Software Foundation. All rights reserved.