Package net.jcores.jre.options

Examples of net.jcores.jre.options.Indexer


       
        Assert.assertEquals(Data.s1.length, c.intValue());
       
        c.set(0);
        final ConcurrentHashMap<Integer, Object> cc = new ConcurrentHashMap<Integer, Object>();
        final Indexer indexer = Indexer.NEW();
       
        $(Data.sn).map(new F1<String, Void>() {
            @SuppressWarnings("boxing")
            @Override
            public Void f(String x) {
                c.getAndIncrement();
                if(cc.containsKey(indexer.i())) System.out.println("DOUBLE " + indexer.i());
                cc.put(indexer.i(), new Object());
                return null;
            }
        }, indexer);
        Assert.assertEquals(Data.sn.length, c.intValue());
View Full Code Here


  
   
    /** */
    @Test
    public void testIndexer() {
        final Indexer indexer = Indexer.NEW();

        $.range(100000).forEach(new F1<Number, Number>() {
            @SuppressWarnings("boxing")
            @Override
            public Number f(Number x) {
                Assert.assertEquals(x, indexer.i());
                return null;
            }
        }, indexer);

        $.range(100000).map(new F1<Number, Number>() {
            @SuppressWarnings("boxing")
            @Override
            public Number f(Number x) {
                Assert.assertEquals(x, indexer.i());
                return null;
            }
        }, indexer);

    }
View Full Code Here

        public MapOptions(Option... options) {
            // Variables to set after we processed the options
            boolean _debug = false;
            Class<?> _type = null;
            Indexer _indexer = null;

            // Check options if we have
            for (Option option : options) {
                if (option instanceof MapType) {
                    _type = ((MapType) option).getType();
View Full Code Here

TOP

Related Classes of net.jcores.jre.options.Indexer

Copyright © 2018 www.massapicom. 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.