package test3; /** * This class represents a counter. Each counter has a count. */ public class Counter { /** * Returns the count of this counter. * * @return the count of this counter. */ public long getCount() { } /** * Increments the count of this counter. */ public void increment() { } /** * Resets the counter of this counter to 0. */ public void reset() { } /** * Compares this counter with the given other counter. * Returns a negative integer/zero/positive integer if * the count of this counter is smaller than/equal/greater * than the counter of the other counter. * * @param other a counter. * @return a negative integer/zero/positive integer if * the count of this counter is smaller than/equal/greater * than the counter of the other counter. */ public int compareTo(Counter other) { } /** * Returns a copy of the given counter if that counter is * not null. Otherwise, a counter with count 0 is returned. * * @param counter counter to be copied. * @return a copy of the given counter if counter != null, * a counter with count 0 otherwise. */ public static Counter copy(Counter counter) { } }