public void setArguments ( Term [ ] arguments ) { // Check that there is at least one and at most two arguments. if ( ( arguments == null ) || ( arguments . length < 1 ) || ( arguments . length > 2 ) ) { throw new IllegalArgumentException ( "An operator has minimum 1 and maximum 2 arguments." ) ; } this . arguments = arguments ; this . arity = arguments . length ; }
Sets the arguments of this operator . It can be convenient to be able to set the outside of the constructor for example when parsing may want to create the operator first and fill in its arguments later .