This project has retired. For details please refer to its Attic page.
PTypeFamily (Apache Crunch 0.8.0 API)

org.apache.crunch.types
Interface PTypeFamily

All Known Implementing Classes:
AvroTypeFamily, WritableTypeFamily

public interface PTypeFamily

An abstract factory for creating PType instances that have the same serialization/storage backing format.


Method Summary
<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)
           
 PType<Double> doubles()
           
 PType<Float> floats()
           
 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>
PType<Tuple4<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>
PType<T>
tuples(Class<T> clazz, PType<?>... ptypes)
           
 PType<TupleN> tuples(PType<?>... ptypes)
           
 

Method Detail

nulls

PType<Void> nulls()

strings

PType<String> strings()

longs

PType<Long> longs()

ints

PType<Integer> ints()

floats

PType<Float> floats()

doubles

PType<Double> doubles()

booleans

PType<Boolean> booleans()

bytes

PType<ByteBuffer> bytes()

records

<T> PType<T> records(Class<T> clazz)

collections

<T> PType<Collection<T>> collections(PType<T> ptype)

maps

<T> PType<Map<String,T>> maps(PType<T> ptype)

pairs

<V1,V2> PType<Pair<V1,V2>> pairs(PType<V1> p1,
                                 PType<V2> p2)

triples

<V1,V2,V3> PType<Tuple3<V1,V2,V3>> triples(PType<V1> p1,
                                           PType<V2> p2,
                                           PType<V3> p3)

quads

<V1,V2,V3,V4> PType<Tuple4<V1,V2,V3,V4>> quads(PType<V1> p1,
                                               PType<V2> p2,
                                               PType<V3> p3,
                                               PType<V4> p4)

tuples

PType<TupleN> tuples(PType<?>... ptypes)

tuples

<T extends Tuple> PType<T> tuples(Class<T> clazz,
                                  PType<?>... ptypes)

derived

<S,T> PType<T> derived(Class<T> clazz,
                       MapFn<S,T> inputFn,
                       MapFn<T,S> outputFn,
                       PType<S> base)

tableOf

<K,V> PTableType<K,V> tableOf(PType<K> key,
                              PType<V> value)

as

<T> PType<T> as(PType<T> ptype)
Returns the equivalent of the given ptype for this family, if it exists.



Copyright © 2013 The Apache Software Foundation. All Rights Reserved.