public List<Node> listAvailableFunctions(Class<?> type){
  List<Node> result=new ArrayList<Node>();
  for (  Node node : availableNodes) {
    if ((node.getNumberOfArguments() > 0) && type.isAssignableFrom(node.getReturnType())) {
      result.add(node);
    }
  }
  if (result.isEmpty()) {
    result.addAll(listAvailableTerminals(type));
  }
  return result;
}

public List < Node > listAvailableFunctions ( Class < ? > type ) { List < Node > result = new ArrayList < Node > ( ) ; for ( Node node : availableNodes ) { if ( ( node . getNumberOfArguments ( ) > 0 ) && type . isAssignableFrom ( node . getReturnType ( ) ) ) { result . add ( node ) ; } } if ( result . isEmpty ( ) ) { result . addAll ( listAvailableTerminals ( type ) ) ; } return result ; }
returns the list of all available function ( non - terminal ) nodes with the given return type .
