public Action(String name, ActionArgument[] arguments) { this.name = name; if (arguments != null) { List<ActionArgument> inputList= new ArrayList<>(); List<ActionArgument> outputList = new ArrayList<>(); for (ActionArgument argument : arguments) { argument.setAction(this); if (argument.getDirection().equals(ActionArgument.Direction.IN)) inputList.add(argument); if (argument.getDirection().equals(ActionArgument.Direction.OUT)) outputList.add(argument); } this.arguments = arguments; this.inputArguments = inputList.toArray(new ActionArgument[inputList.size()]); this.outputArguments = outputList.toArray(new ActionArgument[outputList.size()]); } else { this.arguments = new ActionArgument[0]; this.inputArguments = new ActionArgument[0]; this.outputArguments = new ActionArgument[0]; } }
public Action(String name, ActionArgument[] arguments) { this.name = name; if (arguments != null) { List<ActionArgument> inputList= new ArrayList(); List<ActionArgument> outputList = new ArrayList(); for (ActionArgument argument : arguments) { argument.setAction(this); if (argument.getDirection().equals(ActionArgument.Direction.IN)) inputList.add(argument); if (argument.getDirection().equals(ActionArgument.Direction.OUT)) outputList.add(argument); } this.arguments = arguments; this.inputArguments = inputList.toArray(new ActionArgument[inputList.size()]); this.outputArguments = outputList.toArray(new ActionArgument[outputList.size()]); } else { this.arguments = new ActionArgument[0]; this.inputArguments = new ActionArgument[0]; this.outputArguments = new ActionArgument[0]; } }
public Action(String name, ActionArgument[] arguments) { this.name = name; if (arguments != null) { List<ActionArgument> inputList= new ArrayList<>(); List<ActionArgument> outputList = new ArrayList<>(); for (ActionArgument argument : arguments) { argument.setAction(this); if (argument.getDirection().equals(ActionArgument.Direction.IN)) inputList.add(argument); if (argument.getDirection().equals(ActionArgument.Direction.OUT)) outputList.add(argument); } this.arguments = arguments; this.inputArguments = inputList.toArray(new ActionArgument[inputList.size()]); this.outputArguments = outputList.toArray(new ActionArgument[outputList.size()]); } else { this.arguments = new ActionArgument[0]; this.inputArguments = new ActionArgument[0]; this.outputArguments = new ActionArgument[0]; } }