@Test public void invokeSingleObject() { FunctionTestUtil.assertResult(unionFunction.invoke(new Object[]{10}), Collections.singletonList(10)); }
public FEELFnResult<List<Object>> invoke(@ParameterName("list") Object[] lists) { if ( lists == null ) { return FEELFnResult.ofError(new InvalidParametersEvent(Severity.ERROR, "lists", "cannot be null")); } final Set<Object> resultSet = new LinkedHashSet<>(); for ( final Object list : lists ) { if ( list instanceof Collection ) { resultSet.addAll((Collection) list); } else { resultSet.add(list); } } return FEELFnResult.ofResult( new ArrayList<>(resultSet) ); }
UnionFunction extends BaseFEELFunction { public FEELFnResult<List<Object>> invoke(@ParameterName("list") Object[] lists) { if ( lists == null ) { return FEELFnResult.ofError(new InvalidParametersEvent(Severity.ERROR, "lists", "cannot be null")); } final Set<Object> resultSet = new LinkedHashSet<>(); for ( final Object list : lists ) { if ( list instanceof Collection ) { resultSet.addAll((Collection) list); } else { resultSet.add(list); } } return FEELFnResult.ofResult( new ArrayList<>(resultSet) ); } }
UnionFunction extends BaseFEELFunction { public FEELFnResult<List<Object>> invoke(@ParameterName("list") Object[] lists) { if ( lists == null ) { return FEELFnResult.ofError(new InvalidParametersEvent(Severity.ERROR, "lists", "cannot be null")); } final Set<Object> resultSet = new LinkedHashSet<>(); for ( final Object list : lists ) { if ( list instanceof Collection ) { resultSet.addAll((Collection) list); } else { resultSet.add(list); } } return FEELFnResult.ofResult( new ArrayList<>(resultSet) ); } UnionFunction(); }
UnionFunction extends BaseFEELFunction { public FEELFnResult<List<Object>> invoke(@ParameterName("list") Object[] lists) { if ( lists == null ) { return FEELFnResult.ofError(new InvalidParametersEvent(Severity.ERROR, "lists", "cannot be null")); } final Set<Object> resultSet = new LinkedHashSet<>(); for ( final Object list : lists ) { if ( list instanceof Collection ) { resultSet.addAll((Collection) list); } else { resultSet.add(list); } } return FEELFnResult.ofResult( new ArrayList<>(resultSet) ); } UnionFunction(); FEELFnResult<List<Object>> invoke(@ParameterName("list") Object[] lists); }
UnionFunction extends BaseFEELFunction { public FEELFnResult<List<Object>> invoke(@ParameterName("list") Object[] lists) { if ( lists == null ) { return FEELFnResult.ofError(new InvalidParametersEvent(Severity.ERROR, "lists", "cannot be null")); } final Set<Object> resultSet = new LinkedHashSet<>(); for ( final Object list : lists ) { if ( list instanceof Collection ) { resultSet.addAll((Collection) list); } else { resultSet.add(list); } } return FEELFnResult.ofResult( new ArrayList<>(resultSet) ); } UnionFunction(); FEELFnResult<List<Object>> invoke(@ParameterName("list") Object[] lists);  }