Code example for Scanner

Methods: hasNextLine

0
 
	/** 
	 * @return True if there are more prediction paths 
	 */ 
	public boolean hasNext() { 
		return sc.hasNextLine();
	} 
 
	/** 
	 * @return the next prediction path instance. 
	 */ 
	public List<String> nextInstance() {
		counter++;
		String line = sc.nextLine();
		String[] fields = line.split("\\|");
		return Arrays.asList(fields);
	} 
}