@Test public void convert_formula_argument_to_strings() { FormulaArgument argument = new FormulaArgument( "=[TEST_FIELD]" ); FormulaArgument argument1 = new FormulaArgument( "=[TEST_FIELD1]" ); String[] actualResult = FormulaArgument.convert( new FormulaArgument[] { argument, argument1 } ); assertArrayEquals( new String[] { "TEST_FIELD", "TEST_FIELD1" }, actualResult ); }
public static FormulaArgument[] convert( final String[] definedArgumentNames ) { final FormulaArgument[] args = new FormulaArgument[ definedArgumentNames.length ]; for ( int i = 0; i < definedArgumentNames.length; i++ ) { String definedArgumentName = definedArgumentNames[ i ]; args[ i ] = new FormulaArgument( '=' + FormulaUtil.quoteReference( definedArgumentName ) ); } return args; }
FormulaArgument implements Serializable { public static FormulaArgument[] convert( final String[] definedArgumentNames ) { final FormulaArgument[] args = new FormulaArgument[ definedArgumentNames.length ]; for ( int i = 0; i < definedArgumentNames.length; i++ ) { String definedArgumentName = definedArgumentNames[ i ]; args[ i ] = new FormulaArgument( '=' + FormulaUtil.quoteReference( definedArgumentName ) ); } return args; } }
FormulaArgument implements Serializable { public static FormulaArgument[] convert( final String[] definedArgumentNames ) { final FormulaArgument[] args = new FormulaArgument[ definedArgumentNames.length ]; for ( int i = 0; i < definedArgumentNames.length; i++ ) { String definedArgumentName = definedArgumentNames[ i ]; args[ i ] = new FormulaArgument( '=' + FormulaUtil.quoteReference( definedArgumentName ) ); } return args; } FormulaArgument( final String formula ); }
FormulaArgument implements Serializable { public static FormulaArgument[] convert( final String[] definedArgumentNames ) { final FormulaArgument[] args = new FormulaArgument[ definedArgumentNames.length ]; for ( int i = 0; i < definedArgumentNames.length; i++ ) { String definedArgumentName = definedArgumentNames[ i ]; args[ i ] = new FormulaArgument( '=' + FormulaUtil.quoteReference( definedArgumentName ) ); } return args; } FormulaArgument( final String formula ); String getFormula(); static FormulaArgument create( final String reportField ); static FormulaArgument[] convert( final String[] definedArgumentNames ); static String[] convert( final FormulaArgument[] args ); String[] getReferencedFields(); Object compute( final FormulaContext formulaContext ); boolean equals( final Object o ); int hashCode(); }
FormulaArgument implements Serializable { public static FormulaArgument[] convert( final String[] definedArgumentNames ) { final FormulaArgument[] args = new FormulaArgument[ definedArgumentNames.length ]; for ( int i = 0; i < definedArgumentNames.length; i++ ) { String definedArgumentName = definedArgumentNames[ i ]; args[ i ] = new FormulaArgument( '=' + FormulaUtil.quoteReference( definedArgumentName ) ); } return args; } FormulaArgument( final String formula ); String getFormula(); static FormulaArgument create( final String reportField ); static FormulaArgument[] convert( final String[] definedArgumentNames ); static String[] convert( final FormulaArgument[] args ); String[] getReferencedFields(); Object compute( final FormulaContext formulaContext ); boolean equals( final Object o ); int hashCode();  }