Example usage for org.apache.commons.lang.mutable MutableLong intValue

List of usage examples for org.apache.commons.lang.mutable MutableLong intValue

Introduction

In this page you can find the example usage for org.apache.commons.lang.mutable MutableLong intValue.

Prototype

public int intValue() 

Source Link

Document

Returns the value of this MutableLong as a int.

Usage

From source file:org.openCage.lang.BackgroundExecutorTest.java

@Test
public void testPeriodic() throws InterruptedException {
    BackgroundExecutor bg = new BackgroundExecutorImpl();

    final MutableLong count = new MutableLong(0);

    bg.addPeriodicTask(new FV() {
        public void call() {
            count.increment();//from   ww  w  .jav  a  2  s  .  c  o m
        }
    });

    Thread.sleep(25000);

    synchronized (count) {
        System.out.println(count.intValue());
        assertTrue(count.intValue() > 1);
    }

}