# Class Sorter.CountOrder

public class CountOrder
extends Sorter.AOrder

A decorated ordering strategy that counts all the comparison operations performed. All operations are summed into a single count.

##

aOrder
  The decorated ordering strategy -- the "decoree"
counter
  The counter object that sums the comparison operations

##

CountOrder (Counter, AOrder)
  Teh constructor for this class

##

clearCount ()
  Clears the total count
eq (Object, Object)
  Increments the count and delegates to the decoree
ge (Object, Object)
  Increments the count and delegates to the decoree
getCount ()
  Accessor method for the total count
gt (Object, Object)
  Increments the count and delegates to the decoree
le (Object, Object)
  Increments the count and delegates to the decoree
lt (Object, Object)
  Increments the count and delegates to the decoree
ne (Object, Object)
  Increments the count and delegates to the decoree
setCounter (Counter)
  Accessor method for the counter object used
setOrder (AOrder)
  Accessor method for the decoree

##

counter

    private Counter counter

  The counter object that sums the comparison operations.

aOrder

    private AOrder aOrder

  The decorated ordering strategy -- the "decoree".

##

CountOrder

    public  CountOrder(Counter counter, AOrder aOrder)

  Teh constructor for this class.

  Parameters:
    counter - The counter object to use.
    aOrder - The decoree.

##

getCount

    public int getCount()

  Accessor method for the total count.

  Returns:

clearCount

    public void clearCount()

  Clears the total count.

eq

    public boolean eq(Object x, Object y)

  Increments the count and delegates to the decoree.

  Parameters:
    x -
    y -
  Returns:

ne

    public boolean ne(Object x, Object y)

  Increments the count and delegates to the decoree.

  Parameters:
    x -
    y -
  Returns:

lt

    public boolean lt(Object x, Object y)

  Increments the count and delegates to the decoree.

  Parameters:
    x -
    y -
  Returns:

le

    public boolean le(Object x, Object y)

  Increments the count and delegates to the decoree.

  Parameters:
    x -
    y -
  Returns:

gt

    public boolean gt(Object x, Object y)

  Increments the count and delegates to the decoree.

  Parameters:
    x -
    y -
  Returns:

ge

    public boolean ge(Object x, Object y)

  Increments the count and delegates to the decoree.

  Returns:

setCounter

    public void setCounter(Counter counter)

  Accessor method for the counter object used.

  Parameters:
    counter -

setOrder

    public void setOrder(AOrder aOrder)

  Accessor method for the decoree.

  Parameters:
    aOrder -