Examples of mkString()


Examples of xerial.larray.LIntArray.mkString()

    @Test
    public void constructor() {

        LIntArray l = LArrayJ.newLIntArray(5L);
        for (long i = 0; i < l.size(); ++i) l.update(i, (int) i * 2);
        _logger.debug(l.mkString(", "));
        for (long i = 0; i < l.size(); ++i) l.update(i, (int) (i * i));
        _logger.debug(l.mkString(", "));

        Assert.assertEquals(5L, l.size());

View Full Code Here

Examples of xerial.larray.LIntArray.mkString()

        LIntArray l = LArrayJ.newLIntArray(5L);
        for (long i = 0; i < l.size(); ++i) l.update(i, (int) i * 2);
        _logger.debug(l.mkString(", "));
        for (long i = 0; i < l.size(); ++i) l.update(i, (int) (i * i));
        _logger.debug(l.mkString(", "));

        Assert.assertEquals(5L, l.size());

        l.free();
    }
View Full Code Here

Examples of xerial.larray.LIntArray.mkString()

        // Set elements
        for(int i=0; i<l.size(); ++i)
            l.update(i, i);

        // print the elements
        System.out.println(l.mkString(", "));

        // Traverse the elements
        int index = 0;
        for(Object e : l.ji()) {
            System.out.println(String.format("l(%d) = %d", index, (Integer)e));
View Full Code Here

Examples of xerial.larray.LIntArray.mkString()

        // Build LArray
        LIntArrayBuilder b = new LIntArrayBuilder();
        for(int i=0; i<10; i += 3)
            b.append(i);
        LIntArray lb = b.result(); // LArray(0, 3, 6, 9)
        System.out.println(lb.mkString(", "));

        // Save to a file
        File file = l.saveTo(new File("target/larray.tmp"));
        file.deleteOnExit();
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.