Examples of toArray()


Examples of com.mysema.query.Tuple.toArray()

        Object commentId = null;
        Map<Integer, String> comments = null;
        List<Map<Integer, String>> expected = new LinkedList<Map<Integer, String>>();
        for (Iterator<Tuple> iterator = MAP2_RESULTS.iterate(); iterator.hasNext();) {
            Tuple tuple = iterator.next();
            Object[] array = tuple.toArray();

            if (comments == null || !(commentId == array[0] || commentId != null && commentId.equals(array[0]))) {
                comments = new LinkedHashMap<Integer,String>();
                expected.add(comments);
            }
View Full Code Here

Examples of com.mysema.query.group.Group.toArray()

        Map<Integer, Group> results = CollQueryFactory.from(post, posts).from(comment, comments)
            .where(comment.post.id.eq(post.id))
            .transform(groupBy(post.id).as(post.name, set(comment.id), list(comment.text)));

        Group group = results.get(1);
        Object[] array = group.toArray();
        assertEquals(toInt(1), array[0]);
        assertEquals("Post 1", array[1]);
        assertEquals(toSet(1), array[2]);
        assertEquals(Arrays.asList("Comment 1"), array[3]);
    }
View Full Code Here

Examples of com.ngt.jopenmetaverse.shared.sim.rendering.math.Vectorf.toArray()

    // Set the lighting related uniforms
    GL20.glUniform1i(uUseLightingUniform, uUseLighting);
    Vectorf adjustedLightDirection = lightingDirection.toUnitVector()
        .multiply(-1);
    float[] flatLightDirection = adjustedLightDirection.toArray();
    GL20.glUniform3f(uLightingDirectionUniform, flatLightDirection[0], flatLightDirection[1],
        flatLightDirection[2]);   
    GL20.glUniform3f(uAmbientColorUniform, ambientColorRed, ambientColorGreen, ambientColorBlue);   
    GL20.glUniform3f(uDirectionalColorUniform, directionalColorRed, directionalColorGreen, directionalColorBlue)
View Full Code Here

Examples of com.numb3r3.common.math.Matrix.toArray()

    /**
     * @param args
     */
    public static void main(String[] args) {
        Matrix m = InMemoryJBlasMatrix.randn(3);
        double[] scores1 = m.toArray();
        double[] scores2 = m.mult(-1.0).toArray();

        ArrayPrinting.printDoubleArray(scores1, null, "score 1");
        ArrayPrinting.printDoubleArray(scores2, null, "score 2");
        ArrayPrinting.printIntArray(ArrayUtil.argsort(scores2), null, "sorted array");
View Full Code Here

Examples of com.opengamma.analytics.math.matrix.DoubleMatrix1D.toArray()

    }

    _decompRes = _decomp.evaluate(new com.opengamma.analytics.math.matrix.DoubleMatrix2D(radii));
    final DoubleMatrix1D res = _decompRes.solve(new DoubleMatrix1D(y));

    return res.toArray();
  }

  @Override
  public int hashCode() {
    final int prime = 31;
View Full Code Here

Examples of com.salesforce.ide.deployment.internal.DeploymentComponentSet.toArray()

            if (Utils.isEmpty(deploymentComponentSet)) {
                return null;
            }

            deploymentComponentSet = deploymentComponentSet.sort(sortOrder);
            return deploymentComponentSet.toArray();
        }

        public void dispose() {
        // not implemented
        }
View Full Code Here

Examples of com.sleepycat.je.cleaner.OffsetList.toArray()

        OffsetList list = new OffsetList();
        for (int i = 0; i < offsets.length; i += 1) {
            list.add(offsets[i], true);
        }
        long[] array = list.toArray();
        assertTrue("array=\n" + dump(array) + " offsets=\n" + dump(offsets),
                   Arrays.equals(offsets, array));

        long[] sorted = new long[array.length];
        System.arraycopy(array, 0, sorted, 0, array.length);
View Full Code Here

Examples of com.sleepycat.je.cleaner.PackedOffsets.toArray()

        System.arraycopy(array, 0, sorted, 0, array.length);
        Arrays.sort(sorted);

        PackedOffsets packed = new PackedOffsets();
        packed.pack(array);
        assertTrue(Arrays.equals(sorted, packed.toArray()));
    }

    private ArrayList list(long[] array) {

        ArrayList list = new ArrayList(array.length);
View Full Code Here

Examples of com.sun.istack.FinalArrayList.toArray()

/* 230 */       this.attributeProperties = ((AttributeProperty[])attProps.toArray(new AttributeProperty[attProps.size()]));
/*     */     }
/* 232 */     if (uriProps.isEmpty())
/* 233 */       this.uriProperties = EMPTY_PROPERTIES;
/*     */     else
/* 235 */       this.uriProperties = ((Property[])uriProps.toArray(new Property[uriProps.size()]));
/*     */   }
/*     */
/*     */   public void wrapUp() {
/* 239 */     for (Property p : this.properties)
/* 240 */       p.wrapUp();
View Full Code Here

Examples of com.sun.jna.platform.win32.DsGetDC.DS_DOMAIN_TRUSTS.toArray()

      if(W32Errors.NO_ERROR != rc) {
            throw new Win32Exception(rc);
      }
      try {
            DS_DOMAIN_TRUSTS domainTrustRefs = new DS_DOMAIN_TRUSTS(domainsPointerRef.getValue());
            DS_DOMAIN_TRUSTS[] domainTrusts = (DS_DOMAIN_TRUSTS[]) domainTrustRefs.toArray(new DS_DOMAIN_TRUSTS[domainTrustCount.getValue()]);
            ArrayList<DomainTrust> trusts = new ArrayList<DomainTrust>(domainTrustCount.getValue());
            for(DS_DOMAIN_TRUSTS domainTrust : domainTrusts) {
                DomainTrust t = new DomainTrust();
                if (domainTrust.DnsDomainName != null) {
                  t.DnsDomainName = domainTrust.DnsDomainName.toString();
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.