Some common idioms used in Cascading applications.
Tuple original = new Tuple( "john", "doe" ); // call copy constructor Tuple copy = new Tuple( original ); assert copy.get( 0 ).equals( "john" );
Tuple parent = new Tuple(); parent.add( new Tuple( "john", "doe" ) ); assert ( (Tuple) parent.get( 0 ) ).get( 0 ).equals( "john" );
Fields first = new Fields( "first" ); Fields middle = new Fields( "middle" ); Fields last = new Fields( "last" ); Fields full = first.append( middle ).append( last );
Fields full = new Fields( "first", "middle", "last" ); Fields firstLast = full.subtract( new Fields( "middle" ) );
Copyright © 2007-2008 Concurrent, Inc. All Rights Reserved.