public int next(int current){
  for (int i=current + 1; i < (arguments != null ? arguments.size() : 0); i++) {
    if (getArgument(i) instanceof MathContainer) {
      return i;
    }
  }
  throw new ArrayIndexOutOfBoundsException("Index out of array bounds.");
}

public int next ( int current ) { for ( int i = current + 1 ; i < ( arguments != null ? arguments . size ( ) : 0 ) ; i ++ ) { if ( getArgument ( i ) instanceof MathContainer ) { return i ; } } throw new ArrayIndexOutOfBoundsException ( "Index out of array bounds." ) ; }
get index of next argument .
