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

org.apache.crunch.materialize.pobject
Class CollectionPObject<S>

java.lang.Object
  extended by org.apache.crunch.materialize.pobject.PObjectImpl<S,Collection<S>>
      extended by org.apache.crunch.materialize.pobject.CollectionPObject<S>
Type Parameters:
S - The value type for elements contained in the Collection value encapsulated by this PObject.
All Implemented Interfaces:
PObject<Collection<S>>

public class CollectionPObject<S>
extends PObjectImpl<S,Collection<S>>

A concrete implementation of PObjectImpl whose value is a Java Collection containing the elements of the underlying PCollection for this PObject.


Constructor Summary
CollectionPObject(PCollection<S> collect)
          Constructs a new instance of this PObject implementation.
 
Method Summary
 Collection<S> process(Iterable<S> input)
          Transforms the provided Iterable, obtained from the backing PCollection, into the value encapsulated by this PObject.
 
Methods inherited from class org.apache.crunch.materialize.pobject.PObjectImpl
getValue, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CollectionPObject

public CollectionPObject(PCollection<S> collect)
Constructs a new instance of this PObject implementation.

Parameters:
collect - The backing PCollection for this PObject.
Method Detail

process

public Collection<S> process(Iterable<S> input)
Transforms the provided Iterable, obtained from the backing PCollection, into the value encapsulated by this PObject.

Specified by:
process in class PObjectImpl<S,Collection<S>>
Parameters:
input - An Iterable whose elements correspond to those of the backing PCollection.
Returns:
The value of this PObject.


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