code: public static boolean findBooleanOption(String[] args, String option) {
          for (int i = 0; i<args.length; ++i) {
              if (args[i].equals(option)) return true;
          }
          return false;
      }
docs: Look for a specific switch, return true if found.