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:net.kamhon.ieagle.swing.table.KTableModel.java

@Override
public Object getValueAt(int rowIndex, int columnIndex) {
    if (rowIndex >= getRowCount()) {
        return new Object();
    }//from   w ww .j  a  va2  s  .c om
    if (dataIn2DArray != null) {
        KTableCustomColumnValue customCol = getCustomColumnValue(columnIndex);
        if (customCol != null) {
            return customCol.getValueAt(dataIn2DArray[rowIndex][columnIndex], rowIndex, columnIndex);
        }
        return dataIn2DArray[rowIndex][columnIndex];
    }
    return new Object();
}

From source file:com.redhat.lightblue.metadata.types.BigIntegerTypeTest.java

@Test
public void testCompareV2Null() {
    assertEquals(bigIntegerType.compare(new Object(), null), 1);
}

From source file:org.iterx.miru.spring.beans.TestSpringBeanFactory.java

public void testBeanWrappers() {
    SpringBeanFactory beanFactory;//from   www  .  j  a  va  2  s. com
    BeanWrapper beanWrapper;

    beanFactory = new SpringBeanFactory();

    assertNotNull((beanWrapper = beanFactory.assignBeanWrapper(new Object())));
    beanFactory.recycleBeanWrapper(beanWrapper);
}

From source file:ar.org.neuroph.core.Weight.java

/**
 * Returns cloned instance of this weight
 * Important: trainingData will be lost in cloned instance
 * @return cloned instance of this weight
 * @throws CloneNotSupportedException //from w  w  w.j av a  2s. c o m
 */
@Override
public Object clone() throws CloneNotSupportedException {
    Weight cloned = (Weight) super.clone();
    cloned.setTrainingData(new Object()); // since we cannot call Object.clone() reset training data to nulll
    return cloned;
}

From source file:com.redhat.lightblue.metadata.types.DoubleTypeTest.java

@Test(expected = Error.class)
public void testCcastOther() {
    doubleType.cast(new Object());
}

From source file:com.clust4j.algo.NearestNeighborsTests.java

@Test
@Override//from   w w  w  . j  a v  a2  s.c  o  m
public void testSerialization() throws IOException, ClassNotFoundException {
    NearestNeighbors nn = new NearestNeighbors(data, new NearestNeighborsParameters(5).setVerbose(true)).fit();

    final int[][] c = nn.getNeighbors().getIndices();
    nn.saveObject(new FileOutputStream(TestSuite.tmpSerPath));
    assertTrue(TestSuite.file.exists());

    NearestNeighbors nn2 = (NearestNeighbors) NearestNeighbors
            .loadObject(new FileInputStream(TestSuite.tmpSerPath));
    assertTrue(MatUtils.equalsExactly(nn2.getNeighbors().getIndices(), c));
    assertTrue(nn2.equals(nn));
    assertTrue(nn.equals(nn)); // test the ref return
    assertFalse(nn.equals(new Object()));

    Files.delete(TestSuite.path);
}

From source file:net.sourceforge.vulcan.web.VulcanContextListenerTest.java

public void testDestroyContextCallsShutDownLogs() throws Exception {
    final StoreException e = new StoreException(new RuntimeException("failed"));

    servletContext.setAttribute(Keys.STATE_MANAGER, mgr);
    servletContext.setAttribute(Keys.EVENT_POOL, new Object());

    l.stateManager = mgr;/* w  w w . j  a va  2 s  .  co m*/

    mgr.shutdown();
    expectLastCall().andThrow(e);

    replay();

    l.contextDestroyed(event);

    verify();
    assertNull("Did not remove state manager instance", servletContext.getAttribute(Keys.STATE_MANAGER));
    assertNull("Did not remove eventPool instance", servletContext.getAttribute(Keys.EVENT_POOL));

    assertSame(e, loggedThrowable);
}

From source file:net.oneandone.sushi.fs.webdav.WebdavNode.java

/** @param encodedQuery null or query without initial "?" */
public WebdavNode(WebdavRoot root, String path, String encodedQuery, boolean tryDir) {
    if (path.startsWith("/")) {
        throw new IllegalArgumentException(path);
    }//www.  ja v a 2 s  .  c om
    if (encodedQuery != null && encodedQuery.startsWith("?")) {
        throw new IllegalArgumentException(path);
    }
    this.root = root;
    this.path = path;
    this.encodedQuery = encodedQuery;
    this.tryDir = tryDir;
    this.tryLock = new Object();
}

From source file:org.fishwife.jrugged.spring.jmx.TestMBeanOperationInvoker.java

@Test
public void testInvokeOperation() throws JMException {
    MBeanParameterInfo mockParameterInfo1 = createMock(MBeanParameterInfo.class);
    MBeanParameterInfo mockParameterInfo2 = createMock(MBeanParameterInfo.class);
    MBeanParameterInfo[] parameterInfoArray = new MBeanParameterInfo[] { mockParameterInfo1,
            mockParameterInfo2 };/*w ww .j a  va  2 s .  c  om*/

    expect(mockOperationInfo.getSignature()).andReturn(parameterInfoArray);
    String name1 = "name 1";
    String type1 = "type 1";
    expect(mockParameterInfo1.getType()).andReturn(type1);
    expect(mockParameterInfo1.getName()).andReturn(name1);
    String value1 = "value 1";
    expect(mockValueConverter.convertParameterValue(name1, type1)).andReturn(value1);

    String name2 = "name 2";
    String type2 = "type 2";
    expect(mockParameterInfo2.getType()).andReturn(type2);
    expect(mockParameterInfo2.getName()).andReturn(name2);
    String value2 = "value 2";
    expect(mockValueConverter.convertParameterValue(name2, type2)).andReturn(value2);

    String operationName = "some_operation_name";
    expect(mockOperationInfo.getName()).andReturn(operationName);

    Object value = new Object();
    expect(mockMBeanServer.invoke(eq(mockObjectName), eq(operationName), anyObject(String[].class),
            anyObject(String[].class))).andReturn(value);

    replay(mockMBeanServer, mockObjectName, mockOperationInfo, mockValueConverter, mockParameterInfo1,
            mockParameterInfo2);

    Map<String, String[]> parameterMap = new HashMap<String, String[]>();
    parameterMap.put(name1, new String[] { value1 });
    parameterMap.put(name2, new String[] { value2 });

    Object invokeResult = invoker.invokeOperation(parameterMap);

    assertEquals(value, invokeResult);
    verify(mockMBeanServer, mockObjectName, mockOperationInfo, mockValueConverter, mockParameterInfo1,
            mockParameterInfo2);
}

From source file:org.jimsey.projects.turbine.condenser.service.TurbineService.java

public String listStrategies() {
    String result = null;/*from   ww w .jav  a2 s . c  o  m*/
    try {
        result = json.writeValueAsString(new Object() {
            @JsonProperty("strategies")
            List<EnableTurbineStrategy> strategiez = getStrategies();
        });
    } catch (JsonProcessingException e) {
        logger.error(e.getMessage(), e);
    }
    return result;
}