FileDocCategorySizeDatePackage
Counter.javaAPI DocExample636Tue Nov 13 14:17:06 GMT 2001darwin

Counter

public class Counter extends Object implements Serializable
Simple "page counter" bean. $Id: Counter.java,v 1.1 2001/11/13 19:17:06 ian Exp $

Fields Summary
private int
counter
Constructors Summary
public Counter()
A public no-argument constructor is required of a javabean.

		counter = 1;
	
Methods Summary
public intgetCount()

		return counter;
	
public voidincr()
This method increments the counter. Must be called (in a scriptlet) explicitly at present since there's not way to call methods other than set/get methods in the JSP standard.

		++counter;
	
public voidsetCount(int c)

		counter = c;