This project has retired. For details please refer to its
Attic page.
AvroTypeFamily (Apache Crunch 0.10.0 API)
org.apache.crunch.types.avro
Class AvroTypeFamily
java.lang.Object
org.apache.crunch.types.avro.AvroTypeFamily
- All Implemented Interfaces:
- PTypeFamily
public class AvroTypeFamily
- extends Object
- implements PTypeFamily
Method Summary |
|
as(PType<T> ptype)
Returns the equivalent of the given ptype for this family, if it exists. |
PType<Boolean> |
booleans()
|
PType<ByteBuffer> |
bytes()
|
|
collections(PType<T> ptype)
|
|
containers(Class<T> clazz)
|
|
derived(Class<T> clazz,
MapFn<S,T> inputFn,
MapFn<T,S> outputFn,
PType<S> base)
|
|
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()
|
PType<org.apache.avro.generic.GenericData.Record> |
generics(org.apache.avro.Schema schema)
|
static AvroTypeFamily |
getInstance()
|
PType<Integer> |
ints()
|
PType<Long> |
longs()
|
|
maps(PType<T> ptype)
|
PType<Void> |
nulls()
|
|
pairs(PType<V1> p1,
PType<V2> p2)
|
|
quads(PType<V1> p1,
PType<V2> p2,
PType<V3> p3,
PType<V4> p4)
|
|
records(Class<T> clazz)
|
PType<String> |
strings()
|
|
tableOf(PType<K> key,
PType<V> value)
|
|
triples(PType<V1> p1,
PType<V2> p2,
PType<V3> p3)
|
|
tuples(Class<T> clazz,
PType<?>... ptypes)
|
PType<TupleN> |
tuples(PType<?>... ptypes)
|
PType<Union> |
unionOf(PType<?>... ptypes)
|
getInstance
public static AvroTypeFamily getInstance()
nulls
public PType<Void> nulls()
- Specified by:
nulls
in interface PTypeFamily
strings
public PType<String> strings()
- Specified by:
strings
in interface PTypeFamily
longs
public PType<Long> longs()
- Specified by:
longs
in interface PTypeFamily
ints
public PType<Integer> ints()
- Specified by:
ints
in interface PTypeFamily
floats
public PType<Float> floats()
- Specified by:
floats
in interface PTypeFamily
doubles
public PType<Double> doubles()
- Specified by:
doubles
in interface PTypeFamily
booleans
public PType<Boolean> booleans()
- Specified by:
booleans
in interface PTypeFamily
bytes
public PType<ByteBuffer> bytes()
- Specified by:
bytes
in interface PTypeFamily
records
public <T> PType<T> records(Class<T> clazz)
- Specified by:
records
in interface PTypeFamily
generics
public PType<org.apache.avro.generic.GenericData.Record> generics(org.apache.avro.Schema schema)
containers
public <T> PType<T> containers(Class<T> clazz)
collections
public <T> PType<Collection<T>> collections(PType<T> ptype)
- Specified by:
collections
in interface PTypeFamily
maps
public <T> PType<Map<String,T>> maps(PType<T> ptype)
- Specified by:
maps
in interface PTypeFamily
pairs
public <V1,V2> PType<Pair<V1,V2>> pairs(PType<V1> p1,
PType<V2> p2)
- Specified by:
pairs
in interface PTypeFamily
triples
public <V1,V2,V3> PType<Tuple3<V1,V2,V3>> triples(PType<V1> p1,
PType<V2> p2,
PType<V3> p3)
- Specified by:
triples
in interface PTypeFamily
quads
public <V1,V2,V3,V4> PType<Tuple4<V1,V2,V3,V4>> quads(PType<V1> p1,
PType<V2> p2,
PType<V3> p3,
PType<V4> p4)
- Specified by:
quads
in interface PTypeFamily
tuples
public PType<TupleN> tuples(PType<?>... ptypes)
- Specified by:
tuples
in interface PTypeFamily
tableOf
public <K,V> PTableType<K,V> tableOf(PType<K> key,
PType<V> value)
- Specified by:
tableOf
in interface PTypeFamily
as
public <T> PType<T> as(PType<T> ptype)
- Description copied from interface:
PTypeFamily
- Returns the equivalent of the given ptype for this family, if it exists.
- Specified by:
as
in interface PTypeFamily
tuples
public <T extends Tuple> PType<T> tuples(Class<T> clazz,
PType<?>... ptypes)
- Specified by:
tuples
in interface PTypeFamily
derived
public <S,T> PType<T> derived(Class<T> clazz,
MapFn<S,T> inputFn,
MapFn<T,S> outputFn,
PType<S> base)
- Specified by:
derived
in interface PTypeFamily
derivedImmutable
public <S,T> PType<T> derivedImmutable(Class<T> clazz,
MapFn<S,T> inputFn,
MapFn<T,S> outputFn,
PType<S> base)
- Description copied from interface:
PTypeFamily
- A derived type whose values are immutable. This variaion of derived exists to optimize for the case
where deep-copying of data is never needed.
- Specified by:
derivedImmutable
in interface PTypeFamily
unionOf
public PType<Union> unionOf(PType<?>... ptypes)
- Specified by:
unionOf
in interface PTypeFamily
Copyright © 2014 The Apache Software Foundation. All Rights Reserved.