code: public void setFormat(String format) {
      this.format = format;
  
      // Track multiple streams over the format string.
      Scanner scanner = new Scanner(format);
      this.streams[0] = scanner.stream();
      this.streams[1] = scanner.stream();
      for (int i = 2; i < this.streams.length; i++) {
        this.streams[i] = null;
      }
  
      // Streams for temporary matching.
      this.tag = scanner.stream();
      this.choice = scanner.stream();
    }
docs: Sets the message format.