Example usage for org.apache.commons.lang.mutable MutableDouble equals

List of usage examples for org.apache.commons.lang.mutable MutableDouble equals

Introduction

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

Prototype

public boolean equals(Object obj) 

Source Link

Document

Compares this object against the specified object.

Usage

From source file:com.datatorrent.lib.counters.BasicCountersTest.java

@Test
public void testBasicCounters() throws InstantiationException, IllegalAccessException {
    BasicCounters<MutableDouble> doubleBasicCounters = new BasicCounters<MutableDouble>(MutableDouble.class);
    MutableDouble counterA = doubleBasicCounters.findCounter(CounterKeys.A);

    counterA.increment();//from  www. j av  a2s.com

    MutableDouble counterAInCounters = doubleBasicCounters.getCounter(CounterKeys.A);
    Assert.assertNotNull("null", doubleBasicCounters.getCounter(CounterKeys.A));
    Assert.assertTrue("equality", counterAInCounters.equals(counterA));
    Assert.assertEquals(counterA.doubleValue(), 1.0, 0);
}