src/main/java/org/jboss/util/LongCounter.java
public static LongCounter makeSynchronized(final LongCounter counter)
   {
      return new Wrapper(counter) {
         /** The serialVersionUID */
         private static final long serialVersionUID = 8903330696503363758L;
            public synchronized long increment() {
               return this.counter.increment();
            }

            public synchronized long decrement() {
               return this.counter.decrement();
            }

            public synchronized long getCount() {
               return this.counter.getCount();
            }

            public synchronized void reset() {
               this.counter.reset();
            }

            public synchronized int hashCode() {
               return this.counter.hashCode();
            }

            public synchronized boolean equals(final Object obj) {
               return this.counter.equals(obj);
            }

            public synchronized String toString() {
               return this.counter.toString();
            }

            public synchronized Object clone() {
               return this.counter.clone();
            }
         };
   }
public static LongCounter makeSynchronized(final LongCounter counter)
   {
      return new Wrapper(counter) {
         /** The serialVersionUID */
         private static final long serialVersionUID = 8903330696503363758L;
            public synchronized long increment() {
               return this.counter.increment();
            }

            public synchronized long decrement() {
               return this.counter.decrement();
            }

            public synchronized long getCount() {
               return this.counter.getCount();
            }

            public synchronized void reset() {
               this.counter.reset();
            }

            public synchronized int hashCode() {
               return this.counter.hashCode();
            }

            public synchronized boolean equals(final Object obj) {
               return this.counter.equals(obj);
            }

            public synchronized String toString() {
               return this.counter.toString();
            }

            public synchronized Object clone() {
               return this.counter.clone();
            }
         };
   }
public static LongCounter makeSynchronized ( final LongCounter counter ) { return new Wrapper ( counter ) { /** The serialVersionUID */ private static final long serialVersionUID = 8903330696503363758L ; public synchronized long increment ( ) { return this . counter . increment ( ) ; } public synchronized long decrement ( ) { return this . counter . decrement ( ) ; } public synchronized long getCount ( ) { return this . counter . getCount ( ) ; } public synchronized void reset ( ) { this . counter . reset ( ) ; } public synchronized int hashCode ( ) { return this . counter . hashCode ( ) ; } public synchronized boolean equals ( final Object obj ) { return this . counter . equals ( obj ) ; } public synchronized String toString ( ) { return this . counter . toString ( ) ; } public synchronized Object clone ( ) { return this . counter . clone ( ) ; } } ; }
Return a synchronized counter.

@param counter    LongCounter to synchronize.
@return           Synchronized counter.
Return a synchronized counter .