Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package net.sf.kerner.utils.counter;
 
 
 public class PercentDoneCounter extends Counter {
 
 	public PercentDoneCounter(final Logger logfinal int totalElements) {
 		addRunnable(new Runnable() {
 			public void run() {
				double percent = (doublegetCount() / (doubletotalElements * 100;
				log.info(String.format("%5.2f"percent) + "% done");
			}
		});
	}
New to GrepCode? Check out our FAQ X