# Class Sorter.CountInteger

public class CountInteger
extends Sorter.AInteger

A decorated AInteger used to count accesses to the stored value.

##

aNumber
  The decorated AInteger -- the "decoree"
counter
  The conter object used to accumulate the total count

##

CountInteger (Counter, AInteger)
  The constrcutor for this class

##

clearCount ()
  Clears thetotal count
getCount ()
  Accessor method for the total count
getValue ()
  Accessor method for the stored value
setCounter (Counter)
  Accessor method for the counter object

##

counter

    private Counter counter

  The conter object used to accumulate the total count.

aNumber

    private AInteger aNumber

  The decorated AInteger -- the "decoree".

##

CountInteger

    public  CountInteger(Counter counter, AInteger aNumber)

  The constrcutor for this class.

  Parameters:
    counter - The counter object used to store the count.
    aNumber - The decoree.

##

getValue

    public int getValue()

  Accessor method for the stored value. Increments the total count and delegates to the decoree.

  Returns:

setCounter

    public void setCounter(Counter counter)

  Accessor method for the counter object.

  Parameters:
    counter -

clearCount

    public void clearCount()

  Clears thetotal count.

getCount

    public int getCount()

  Accessor method for the total count.

  Returns: