Example usage for java.lang Object Object

List of usage examples for java.lang Object Object

Introduction

In this page you can find the example usage for java.lang Object Object.

Prototype

@HotSpotIntrinsicCandidate
public Object() 

Source Link

Document

Constructs a new object.

Usage

From source file:rk.java.compute.cep.EventBusTest.java

@Before
public void setUp() throws Exception {

    priceEventSink = new IPriceEventSink() {
        int count = 0;

        @Override//from w ww  .  j a  v a  2  s  .  co  m
        public void publish(Object event) {
            count++;
            if (count % printTicksEvery == 0)
                eventBus.post(event);
        }
    };

    eventBus.register(new Object() {
        @Subscribe
        public void listen(AveragePrice pp) {
            System.out.println(pp);
        }
    });
}

From source file:net.dv8tion.jda.bot.utils.cache.impl.ShardCacheViewImpl.java

public ShardCacheViewImpl(int initialCapacity) {
    this.elements = new TSynchronizedIntObjectMap<>(new TIntObjectHashMap<>(initialCapacity), new Object());
}

From source file:org.openspaces.eviction.test.FIFOSingleOrderTest.java

@Before
public void cleanSpace() {
    gigaSpace.clear(new Object());
}

From source file:de.r2soft.empires.framework.test.ObjectTreeTest.java

@Test
public void testDelete() {
    tree.insert(new Vector2D(20, 20), new Object());
    tree.delete(new Vector2D(20, 20));
    Object obj = tree.search(new Vector2D(20, 20));
    Assert.assertNull(obj);//from   ww  w .  j a va 2 s .  c  o  m
}

From source file:me.ferrybig.javacoding.webmapper.test.session.DefaultDataStorageTest.java

@Test
public void getDataAsChoosesCorrectBackendTypeTest() {
    List<Object> list = new ArrayList<>();
    list.add(new Object());
    list.add(BigInteger.ZERO);//from   w  ww .  j  av  a 2 s.  com
    list.add("string");
    list.add(Boolean.FALSE);
    list.add(new JSONObject());
    data.setData(list);
    assertEquals("string", extr(data.getDataAs(String.class)));
}

From source file:org.mifos.androidclient.templates.ServiceConnectivityTask.java

public ServiceConnectivityTask(Context context, String progressTitle, String progressMessage) {
    mContext = context;//from   w w  w.  j  ava  2 s  . c o  m
    mUIUtils = new UIUtils(mContext);
    mLock = new Object();
    mCauses = new String[2];
    mCauses[0] = mContext.getString(R.string.toast_connection_error);
    mCauses[1] = mContext.getString(R.string.toast_address_invalid);
    mProgressTitle = progressTitle;
    mProgressMessage = progressMessage;
    mTerminated = false;
}

From source file:com.manning.androidhacks.hack040.util.LIFOTask.java

public LIFOTask(Runnable runnable) {
    super(runnable, new Object());
    priority = counter++;
}

From source file:org.openrepose.core.services.httpclient.impl.ClientDecommissioner.java

public ClientDecommissioner(HttpClientUserManager userManager) {

    clientList = new ArrayList<HttpClient>();
    listLock = new Object();
    done = false;//from   w ww.  j  av  a 2s.  c om
    this.userManager = userManager;
}

From source file:fixio.netty.pipeline.TestRequestHandlerTest.java

@Test
public void testRejectNotSupportedObject() {
    assertFalse(handler.acceptInboundMessage(new Object()));
}

From source file:core.sample.pool.PoolTester.java

/**
 * runWithNotify - method simulates the use of wait() and notify().
 *///from  w w  w.j  av a 2 s .c  o m
public void runWithNotify() {
    try {
        log.debug("**** Running run().. ");
        WorkerThread rt1 = (WorkerThread) pool.borrowObject();

        Object synObj = new Object();
        rt1.execute("core.sample.pool.SampleWork", "executeTask", null, null, synObj);
        synchronized (synObj) {
            synObj.wait(4000);
        }
        Object result = rt1.getResult();
        log.debug("**Result = " + result);

        pool.returnObject(rt1);
    } catch (Exception e) {
        log.error("", e);
    }
}