Back to project page sdl_tester_android.
The source code is released under:
Copyright (c) 2014, Ford Motor Company All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are m...
If you think the Android project sdl_tester_android listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.livio.sdl.utils; /* www. j a v a 2 s . c o m*/ /** * Represents an abstract integer counter. * * @author Mike Burke * */ public abstract class Counter { /** * Returns the current value of the counter and moves to the next one. * * @return Current value of the counter */ abstract public int next(); private final int START; protected int current; public Counter(){ this.START = 0; this.current = START; } public Counter(int start){ this.START = start; this.current = start; } /** * Resets the counter to its original starting point. */ public void reset(){ this.current = START; } /** * Returns the current value of the counter. * * @return The current value of the counter */ public int current(){ return current; } }