code: public RobotsDirectives getDirectivesFor(String ua, boolean useFallbacks) {
          // find matching ua
          for(String uaListed : namedUserAgents) {
              if(ua.indexOf(uaListed)>-1) {
                  return agentsToDirectives.get(uaListed);
              }
          }
          if(useFallbacks==false) {
              return null; 
          }
          if (wildcardDirectives!=null) {
              return wildcardDirectives;
          }
          // no applicable user-agents, so empty directives
          return NO_DIRECTIVES; 
      }
docs: Return the RobotsDirectives, if any, appropriate for the given User-Agent
  string. If useFallbacks is true, a wildcard ('*') directives or the default
  of NO_DIRECTIVES will be returned, as appropriate, if there is no better
  match. If useFallbacks is false, a null will be returned if no declared
  directives targeted the given User-Agent.
  
  @param ua String User-Agent to lookup
  @param useFallbacks if true, fall-back to wildcard directives or
  default allow as needed
  @return directives to use, or null if useFallbacks is false and no
  non-wildcard directives match the supplied User-Agent