|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.crunch.contrib.text.Extractors
public final class Extractors
Factory methods for constructing common Extractor
types.
Constructor Summary | |
---|---|
Extractors()
|
Method Summary | ||
---|---|---|
static Extractor<Boolean> |
xboolean()
Returns an Extractor for booleans. |
|
static Extractor<Boolean> |
xboolean(Boolean defaultValue)
|
|
static
|
xcollect(TokenizerFactory scannerFactory,
Extractor<T> extractor)
|
|
static
|
xcustom(Class<T> clazz,
TokenizerFactory scannerFactory,
Extractor... extractors)
Returns an Extractor for a subclass of Tuple with a constructor that
has the given extractor types that uses the given TokenizerFactory
for parsing the sub-fields. |
|
static Extractor<Double> |
xdouble()
Returns an Extractor for doubles. |
|
static Extractor<Double> |
xdouble(Double defaultValue)
|
|
static Extractor<Float> |
xfloat()
Returns an Extractor for floats. |
|
static Extractor<Float> |
xfloat(Float defaultValue)
|
|
static Extractor<Integer> |
xint()
Returns an Extractor for integers. |
|
static Extractor<Integer> |
xint(Integer defaultValue)
Returns an Extractor for integers. |
|
static Extractor<Long> |
xlong()
Returns an Extractor for longs. |
|
static Extractor<Long> |
xlong(Long defaultValue)
Returns an Extractor for longs. |
|
static
|
xpair(TokenizerFactory scannerFactory,
Extractor<K> one,
Extractor<V> two)
Returns an Extractor for pairs of the given types that uses the given TokenizerFactory
for parsing the sub-fields. |
|
static
|
xquad(TokenizerFactory scannerFactory,
Extractor<A> a,
Extractor<B> b,
Extractor<C> c,
Extractor<D> d)
Returns an Extractor for quads of the given types that uses the given TokenizerFactory
for parsing the sub-fields. |
|
static Extractor<String> |
xstring()
Returns an Extractor for strings. |
|
static Extractor<String> |
xstring(String defaultValue)
|
|
static
|
xtriple(TokenizerFactory scannerFactory,
Extractor<A> a,
Extractor<B> b,
Extractor<C> c)
Returns an Extractor for triples of the given types that uses the given TokenizerFactory
for parsing the sub-fields. |
|
static Extractor<TupleN> |
xtupleN(TokenizerFactory scannerFactory,
Extractor... extractors)
Returns an Extractor for an arbitrary number of types that uses the given TokenizerFactory
for parsing the sub-fields. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Extractors()
Method Detail |
---|
public static Extractor<Integer> xint()
public static Extractor<Integer> xint(Integer defaultValue)
public static Extractor<Long> xlong()
public static Extractor<Long> xlong(Long defaultValue)
public static Extractor<Float> xfloat()
public static Extractor<Float> xfloat(Float defaultValue)
public static Extractor<Double> xdouble()
public static Extractor<Double> xdouble(Double defaultValue)
public static Extractor<Boolean> xboolean()
public static Extractor<Boolean> xboolean(Boolean defaultValue)
public static Extractor<String> xstring()
public static Extractor<String> xstring(String defaultValue)
public static <T> Extractor<Collection<T>> xcollect(TokenizerFactory scannerFactory, Extractor<T> extractor)
public static <K,V> Extractor<Pair<K,V>> xpair(TokenizerFactory scannerFactory, Extractor<K> one, Extractor<V> two)
TokenizerFactory
for parsing the sub-fields.
public static <A,B,C> Extractor<Tuple3<A,B,C>> xtriple(TokenizerFactory scannerFactory, Extractor<A> a, Extractor<B> b, Extractor<C> c)
TokenizerFactory
for parsing the sub-fields.
public static <A,B,C,D> Extractor<Tuple4<A,B,C,D>> xquad(TokenizerFactory scannerFactory, Extractor<A> a, Extractor<B> b, Extractor<C> c, Extractor<D> d)
TokenizerFactory
for parsing the sub-fields.
public static Extractor<TupleN> xtupleN(TokenizerFactory scannerFactory, Extractor... extractors)
TokenizerFactory
for parsing the sub-fields.
public static <T extends Tuple> Extractor<T> xcustom(Class<T> clazz, TokenizerFactory scannerFactory, Extractor... extractors)
Tuple
with a constructor that
has the given extractor types that uses the given TokenizerFactory
for parsing the sub-fields.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |