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

com.jayway.android.robotium.solo.MatchCounter Maven / Gradle / Ivy

There is a newer version: 5.6.3
Show newest version
package com.jayway.android.robotium.solo;

/**
 * This class contains methods for counting matches, retrieving the count and reseting the counter. 
 * 
 * @author Renas Reda, [email protected]
 *
 */

class MatchCounter {
	
	private int totalAmountOfMatches;
	
	/**
	 * Constructs this object.
	 * 
	 */
	
	public MatchCounter(){
		totalAmountOfMatches = 0;
	}

   
	/**
	 * Resets the counter.
	 * 
	 */
	
	public void resetCount(){
			totalAmountOfMatches = 0;
	}
	
	/**
	 * Adds 1 to the counter.
	 * 
	 */
	
	public void addMatchToCount(){
		totalAmountOfMatches++;
	}
	
	/**
	 * Adds number to the counter.
	 * 
	 * @param numberOfMatches the number to add to the counter
	 * 
	 */
	
	public void addMatchesToCount(int numberOfMatches){
		
		totalAmountOfMatches += numberOfMatches;
		
	}
	
	/**
	 * Returns the total count.
	 * 
	 * @return the total count
	 * 
	 */
	
	public int getTotalCount(){
		return totalAmountOfMatches;
	}
	
	
	

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy