org.ow2.frascati.examples.counter.lib
Class CounterServiceImpl

java.lang.Object
  extended by org.ow2.frascati.examples.counter.lib.CounterServiceImpl
All Implemented Interfaces:
CounterService

public class CounterServiceImpl
extends java.lang.Object
implements CounterService

A simple implementation of the CounterService interface.

Author:
Philippe Merle

Field Summary
protected  int value
          Internal state of the counter.
 
Constructor Summary
CounterServiceImpl()
           
 
Method Summary
 void decrement(int v)
          Decrement the counter value.
 int getValue()
          Return the counter value.
 void increment(int v)
          Increment the counter value.
 void resetIt()
          Reset the counter value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

value

protected int value
Internal state of the counter.

Constructor Detail

CounterServiceImpl

public CounterServiceImpl()
Method Detail

getValue

public int getValue()
Return the counter value.

Specified by:
getValue in interface CounterService
Returns:
the counter value.

increment

public void increment(int v)
Increment the counter value.

Specified by:
increment in interface CounterService

decrement

public void decrement(int v)
Decrement the counter value.

Specified by:
decrement in interface CounterService

resetIt

public void resetIt()
Reset the counter value.

Specified by:
resetIt in interface CounterService


Copyright © 2010 OW2 Consortium. All Rights Reserved.