Examples of nextValue()


Examples of com.tinkerpop.furnace.generators.NormalDistribution.nextValue()

        //normal
        Distribution n = new NormalDistribution(2);
        n = n.initialize(numNodes,numEdges);
        int degreeSum = 0;
        for (int i=0;i<numNodes;i++) {
            int degree=n.nextValue(random);
            degreeSum+=degree;
        }
        System.out.println(degreeSum);

        random = new Random(seed);
View Full Code Here

Examples of javax.jdo.datastore.Sequence.nextValue()

    // allocator in line with the prod allocator
    // assertEquals(range.getEnd().getId(), pojo.getId() - 1);
    assertTrue(range.getEnd().getId() < pojo.getId());
    Sequence seq = pm.getSequence("jdo1b");
//    assertEquals(pojo.getId() + 12, seq.nextValue());
    assertTrue(pojo.getId() + 12 <= seq.nextValue());
//    assertEquals(pojo.getId() + 13, seq.nextValue());
    assertTrue(pojo.getId() + 13 <= seq.nextValue());
    assertEquals(Utils.newArrayList("jdothat2", "jdothat2"), sequenceNames);
    assertEquals(Utils.newArrayList(12L, 12L), sequenceBatchSizes);
    sequenceNames.clear();
View Full Code Here

Examples of net.sf.json.util.JSONTokener.nextValue()

    try {
      JSONDirectoryBuilder builder = new JSONDirectoryBuilder(ddDir);
      builder.write(ddWriter);

      JSONTokener jsonTokener = new JSONTokener(ddWriter.toString());
      Object obj = jsonTokener.nextValue();
      if( obj instanceof JSONObject ) {
        designDoc = (JSONObject)obj;
      } else {
        throw new Exception("Unexpected returned object type: "+obj.getClass().getSimpleName());
      }
View Full Code Here

Examples of org.apache.derbyTesting.functionTests.util.UniqueRandomSequence.nextValue()

                }
                if (withSecIndexColumn) {
                    ps.setInt(col++, secIdSequence.nextValue());
                }
                if (withNonIndexedColumn) {
                    ps.setInt(col++, nonIndexedSequence.nextValue());
                }
                ps.executeUpdate();
                if ((i % 1000) == 0) {
                    c.commit();
                }
View Full Code Here

Examples of org.apache.trevni.ColumnValues.nextValue()

 
  private void valueToJson(ColumnMetaData column) throws IOException {
    generator.writeFieldName(shortNames[column.getNumber()]);
    ColumnValues in = values[column.getNumber()];
    if (!column.isArray()) {
      primitiveToJson(column, in.nextValue());
    } else {
      generator.writeStartArray();
      int length = in.nextLength();
      for (int i = 0; i < length; i++) {
        Object value = in.nextValue();
View Full Code Here

Examples of org.codehaus.jackson.JsonParser.nextValue()

        }
        if(!parser.nextFieldName(new SerializedString("spans"))){
            throw new IOException("JSON serialized AnalyzedText MUST define the 'spans' field as first entry "
                + "in the root JSON object!");
        }
        if(parser.nextValue() != JsonToken.START_ARRAY){
            throw new IOException("The value of the 'span' field MUST BE an Json Array!");
        }
        boolean first = true;
        while(parser.nextValue() == JsonToken.START_OBJECT){
            if(first){
View Full Code Here

Examples of org.eclipse.wst.xml.core.internal.commentelement.util.TagScanner.nextValue()

    Element element = factory.create(tagName, CommentElementFactory.IS_START);

    // set attributes
    String attrName = scanner.nextName();
    while (attrName != null) {
      String attrValue = scanner.nextValue();
      Attr attr = document.createAttribute(attrName);
      if (attr != null) {
        if (attrValue != null)
          attr.setValue(attrValue);
        element.setAttributeNode(attr);
View Full Code Here

Examples of org.hibernate.ogm.dialect.GridDialect.nextValue()

        new Object[] { segmentColumnValue }
    );

    GridDialect dialect = getDialect(session);
    IntegralDataTypeHolder value = IdentifierGeneratorHelper.getIntegralDataTypeHolder( identifierType.getReturnedClass() );
    dialect.nextValue(key, value, optimizer.applyIncrementSizeToSourceValues() ? incrementSize : 1, initialValue);

    accessCount++;

    return value;
  }
View Full Code Here

Examples of org.json.JSONTokener.nextValue()

      int statusCode= postMethod.getStatusCode();
      if (statusCode!=HttpStatus. SC_OK)
        throw new ClientError("HTTP Status - " +
          HttpStatus.getStatusText(statusCode) + " (" + statusCode + ")");
      JSONTokener tokener= new JSONTokener(postMethod.getResponseBodyAsString());
      Object rawResponseMessage= tokener.nextValue();
      JSONObject responseMessage= (JSONObject)rawResponseMessage;
      if (responseMessage==null)
        throw new ClientError("Invalid response type - " + rawResponseMessage.getClass());
      return responseMessage;   
    } catch (ParseException e) {
View Full Code Here

Examples of org.json.JSONTokener.nextValue()

          new NameValuePair("sort_type", "desc") };
      String contactsUrl = lastUrl.substring(0, lastUrl.lastIndexOf("/"))
          + "/addr_member.php";
      String json = doPost(contactsUrl, params);
      JSONTokener jsonTokener = new JSONTokener(json);
      Object o = jsonTokener.nextValue();
      JSONObject jsonObj = (JSONObject) o;
      JSONObject jsonData = jsonObj.getJSONObject("data");
      JSONArray jsonContacts = jsonData.getJSONArray("contact");
      List<Contact> contacts = new ArrayList<Contact>();
      for (int i = 0; i < jsonContacts.length(); i++) {
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.