code: private static boolean hasOption(String[] args, String option) {
          for (String a : args) {
              if (a.equals(option)) return true;
          }
          return false;
      }
docs: Scan the arguments to find an option is used.