public static SingleInputSemanticProperties addSourceFieldOffset ( SingleInputSemanticProperties props , int numInputFields , int offset ) { SingleInputSemanticProperties offsetProps = new SingleInputSemanticProperties ( ) ; if ( props . getReadFields ( 0 ) != null ) { FieldSet offsetReadFields = new FieldSet ( ) ; for ( int r : props . getReadFields ( 0 ) ) { offsetReadFields = offsetReadFields . addField ( r + offset ) ; } offsetProps . addReadFields ( offsetReadFields ) ; } for ( int s = 0 ; s < numInputFields ; s ++ ) { FieldSet targetFields = props . getForwardingTargetFields ( 0 , s ) ; for ( int t : targetFields ) { offsetProps . addForwardedField ( s + offset , t ) ; } } return offsetProps ; }
Creates SemanticProperties by adding an offset to each input field index of the given SemanticProperties .