9. CookBook

Some common idioms used in Cascading applications.

9.1 Tuples and Fields

Copy a Tuple instance
Tuple original = new Tuple( "john", "doe" );

// call copy constructor
Tuple copy = new Tuple( original );

assert copy.get( 0 ).equals( "john" );
Nest a Tuple instance within a Tuple
Tuple parent = new Tuple();
parent.add( new Tuple( "john", "doe" ) );

assert ( (Tuple) parent.get( 0 ) ).get( 0 ).equals( "john" );

Copyright © 2007-2008 Concurrent, Inc. All Rights Reserved.