All Downloads are FREE. Search and download functionalities are using the official Maven repository.

toxgene.util.ToXgeneReporterImpl Maven / Gradle / Ivy

The newest version!
/**
 * Implements a simple reporting tool for the command line version of ToXgene
 *
 * @author Denilson Barbosa
 *
 * @version 0.1
 */

package toxgene.util;

import java.util.Vector;

import toxgene.interfaces.ToXgeneReporter;

public class ToXgeneReporterImpl implements ToXgeneReporter{
	private boolean verbose;
	private boolean showWarnings;	
	private Vector warnings;
	
	public ToXgeneReporterImpl(boolean verbose, boolean showWarnings){
		this.verbose = verbose;
		this.showWarnings = showWarnings;
		warnings = new Vector(10,10);
	}
	
	public void warning(String message){
			warnings.add(message);
	}

	public void explain(String message){
		if (verbose)
			System.out.println(message);
	}

	public void progress(String message){
		System.out.print(message);
	}

	public int warnings(){
		return warnings.size();
	}

	public void printAllWarnings(){
		if (showWarnings)
				for (int i=0; i




© 2015 - 2024 Weber Informatics LLC | Privacy Policy