Code example for Splitter

Methods: split

0
    public NodeId nodeId;
    public TaskId taskId;
  } 
 
  public static NodeId toNodeID(String data) {
    final Iterator<String> nodeIdIt = SPLITTER.split(data).iterator();
 
    final NodeId nodeId = Records.newRecord(NodeId.class);
    nodeId.setHost(nodeIdIt.next());
    nodeId.setPort(Integer.parseInt(nodeIdIt.next()));
 
    return nodeId;
  } 
 
 
} 
Experience pair programming with AI  Get Codota for Java