Examples of values()


Examples of com.jbidwatcher.util.Record.values()

      Record insertMap = getFirstResult(rs);
      if (insertMap.containsKey("1")) {
        return insertMap.get("1");
      } else if(insertMap.containsKey("generated_key")) {
        return insertMap.get("generated_key");
      } else if(insertMap.values().size() == 1) {
        return insertMap.values().toArray()[0].toString();
      }
    }
    return "";
  }
View Full Code Here

Examples of com.jetdrone.vertx.yoke.core.Context.values()

        }};

        Context ctx = new Context(ro);
        ctx.put("title", "rw-title");

        Collection<Object> values = ctx.values();
        Collection<Object> expectedValues = new LinkedList<Object>() {{
            add("rw-title");
        }};

        assertEquals(expectedValues, values);
View Full Code Here

Examples of com.linkedin.data.DataList.values()

    String actualProtocol2IdsAsString = actualParams.remove("ids").get(0);
    String expectedProtocol2IdsAsString = expectedParams.remove("ids").get(0);
    DataList actualProtocol2Ids = (DataList) URIElementParser.parse(actualProtocol2IdsAsString);
    DataList expectedProtocol2Ids = (DataList) URIElementParser.parse(expectedProtocol2IdsAsString);
    Assert.assertEquals(new HashSet<Object>(actualProtocol2Ids.values()),
                        new HashSet<Object>(expectedProtocol2Ids.values()));

    // apart from the "ids" fields everything else should be the same
    Assert.assertEquals(actualParams, expectedParams);
  }
View Full Code Here

Examples of com.linkedin.data.DataMap.values()

      final PrimitiveDataSchema valueSchema = DataSchemaUtil.dataSchemaTypeToPrimitiveDataSchema(entry.getKey());
      final MapDataSchema mapSchema = new MapDataSchema(valueSchema);
      final DataMap value = (DataMap) SchemaSampleDataGenerator.buildData(mapSchema, _spec);
      final ParameterizedType mapType = (ParameterizedType) entry.getValue().getGenericSuperclass();
      assert(mapType.getRawType() == DirectMapTemplate.class);
      Assert.assertSame(value.values().iterator().next().getClass(), mapType.getActualTypeArguments()[0]);
    }
  }

  @Test
  public void testFixedSchema()
View Full Code Here

Examples of com.mchange.v2.util.DoubleWeakHashMap.values()

        m.put(a, poop);
        m.put(b, scoop);
        m.put(c, doop);
        assertEquals("Size should be three, viewed via Map directly.", m.size(), 3);
        assertEquals("Size should be three, viewed via keySet .", m.keySet().size(), 3);
        assertEquals("Size should be three, viewed via values Collection.", m.values().size(), 3);
       
        int count = 0;
        for (Iterator ii = m.keySet().iterator(); ii.hasNext();)
        {
            count += ((Integer) ii.next()).intValue();
View Full Code Here

Examples of com.mongodb.BasicDBObject.values()

        _s0_docCountHint.put(DocCountPojo.doccount_, 1);
      }
      DBCursor dbc = DbManager.getDocument().getCounts().find(query, _s0_docCountFields).hint(_s0_docCountHint);
      while (dbc.hasNext()) {
        BasicDBObject dbo = (BasicDBObject) dbc.next();
        Iterator<?> it = dbo.values().iterator();
        if (it.hasNext()) {
          nDocCount += (double)((Long)it.next()).longValue(); // (from _s0_docCountFields, doccount is only return variable)
        }
      }
      if (0 == nDocCount) { // (Probably shouldn't happen if a harvest has occurred, just don't bomb out
View Full Code Here

Examples of com.nhncorp.mods.socket.io.impl.Room.values()

  private void print(Map<String, Room> rooms) {
    System.out.println("===================== Rooms ===================");
    for(Map.Entry<String, Room> entry : rooms.entrySet()){
      System.out.println(entry.getKey());
      Room room  = entry.getValue();
      for(String client : room.values()) {
        System.out.println(client);
      }
    }
  }
View Full Code Here

Examples of com.opengamma.analytics.financial.greeks.GreekResultCollection.values()

  public void testPriceOnly() {
    final GreekResultCollection result = MODEL.getGreeks(new EuropeanVanillaOptionDefinition(100, new Expiry(DateUtils.getUTCDate(2010, 1, 1)), true), new StandardOptionDataBundle(null, 0, null, 100,
        DateUtils.getUTCDate(2010, 1, 1)), Sets.newHashSet(Greek.FAIR_PRICE, Greek.DELTA, Greek.GAMMA));
    assertEquals(result.size(), 1);
    assertEquals(result.keySet().iterator().next(), Greek.FAIR_PRICE);
    assertEquals(result.values().iterator().next(), 2., 0);
  }

  private static class DummyModel extends MonteCarloOptionModel<OptionDefinition, StandardOptionDataBundle> {

    public DummyModel(final int n, final int steps, final StochasticProcess<OptionDefinition, StandardOptionDataBundle> process, final RandomNumberGenerator generator) {
View Full Code Here

Examples of com.rc.retroweaver.optimizer.ConstantPool.values()

            SignatureStripper sigStripper = new SignatureStripper(classWeaver);
            cr.accept(sigStripper, false);       

            if (COMPACT_CONSTANTS) {
              Set<Constant> constants = new TreeSet<Constant>(new ConstantComparator());
              constants.addAll(cp.values());

              cr = new ClassReader(cw.toByteArray());
                cw = new ClassWriter(false);
                for(Constant c: constants)
                  c.write(cw);
View Full Code Here

Examples of com.sleepycat.bdb.collection.StoredSortedMap.values()

        assertTrue(!((StoredContainer) map.entrySet()).isDirtyReadEnabled());

        StoredSortedMap other =
            (StoredSortedMap) StoredCollections.dirtyReadMap(map);
        assertTrue(other.isDirtyReadEnabled());
        assertTrue(((StoredContainer) other.values()).isDirtyReadEnabled());
        assertTrue(((StoredContainer) other.keySet()).isDirtyReadEnabled());
        assertTrue(((StoredContainer) other.entrySet()).isDirtyReadEnabled());
        assertTrue(!map.isDirtyReadEnabled());
        assertTrue(!((StoredContainer) map.values()).isDirtyReadEnabled());
        assertTrue(!((StoredContainer) map.keySet()).isDirtyReadEnabled());
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.