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

org.apache.crunch
Class Union

java.lang.Object
  extended by org.apache.crunch.Union

public class Union
extends Object

Allows us to represent the combination of multiple data sources that may contain different types of data as a single type with an index to indicate which of the original sources the current record was from.


Constructor Summary
Union(int index, Object value)
           
 
Method Summary
 boolean equals(Object o)
           
 int getIndex()
          Returns the index of the original data source for this union type.
 Object getValue()
          Returns the underlying object value of the record.
 int hashCode()
           
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Union

public Union(int index,
             Object value)
Method Detail

getIndex

public int getIndex()
Returns the index of the original data source for this union type.


getValue

public Object getValue()
Returns the underlying object value of the record.


equals

public boolean equals(Object o)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object


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