Code example for Splitter

Methods: split

0
    private String time;
    private String name;
    private String msg;
 
    public Event(String logLine) {
      Iterator<String> pieces = onWhiteSpace.split(logLine).iterator();
      time = pieces.next();
      name = pieces.next();
      msg = pieces.next();
    } 
 
    public String getName() {
      return name;
    } 
 
    @Override 
    public int compareTo(Event o) {
      return this.time.compareTo(o.time);
    } 
  } 
Experience pair programming with AI  Get Codota for Java