/** * Initiates a ProjectCross transformation and projects the second cross input<br/> * If the second cross input is a {@link Tuple} {@link DataSet}, fields can be selected by their index. * If the second cross input is not a Tuple DataSet, no parameters should be passed.<br/> * * Fields of the first and second input can be added by chaining the method calls of * {@link CrossProjection#projectFirst(int...)} and {@link CrossProjection#projectSecond(int...)}. * * @param fieldIndexes If the second input is a Tuple DataSet, the indexes of the selected fields. * For a non-Tuple DataSet, do not provide parameters. * The order of fields in the output tuple is defined by to the order of field indexes. * @return A CrossProjection that needs to be converted into a {@link ProjectCross} to complete the * Cross transformation by calling {@link CrossProjection#types()}. * * @see Tuple * @see DataSet * @see CrossProjection * @see ProjectCross */ public CrossProjection<I1, I2> projectSecond(int... secondFieldIndexes) { return new CrossProjection<I1, I2>(input1, input2, null, secondFieldIndexes); } }
/** * Initiates a ProjectCross transformation and projects the first cross input<br/> * If the first cross input is a {@link Tuple} {@link DataSet}, fields can be selected by their index. * If the first cross input is not a Tuple DataSet, no parameters should be passed.<br/> * * Fields of the first and second input can be added by chaining the method calls of * {@link CrossProjection#projectFirst(int...)} and {@link CrossProjection#projectSecond(int...)}. * * @param fieldIndexes If the first input is a Tuple DataSet, the indexes of the selected fields. * For a non-Tuple DataSet, do not provide parameters. * The order of fields in the output tuple is defined by to the order of field indexes. * @return A CrossProjection that needs to be converted into a {@link ProjectCross} to complete the * Cross transformation by calling {@link CrossProjection#types()}. * * @see Tuple * @see DataSet * @see CrossProjection * @see ProjectCross */ public CrossProjection<I1, I2> projectFirst(int... firstFieldIndexes) { return new CrossProjection<I1, I2>(input1, input2, firstFieldIndexes, null); }