Examples of CharShortPredicate


Examples of com.gs.collections.api.block.predicate.primitive.CharShortPredicate

        public boolean retainAll(CharIterable source)
        {
            int oldSize = this.size();
            final CharSet sourceSet = source instanceof CharSet ? (CharSet) source : source.toSet();
            CharShortHashMap retained = CharShortHashMap.this.select(new CharShortPredicate()
            {
                public boolean accept(char key, short value)
                {
                    return sourceSet.contains(key);
                }

Examples of com.gs.collections.api.block.predicate.primitive.CharShortPredicate

        public boolean retainAll(ShortIterable source)
        {
            int oldSize = this.size();
            final ShortSet sourceSet = source instanceof ShortSet ? (ShortSet) source : source.toSet();
            CharShortHashMap retained = CharShortHashMap.this.select(new CharShortPredicate()
            {
                public boolean accept(char key, short value)
                {
                    return sourceSet.contains(value);
                }

Examples of net.openhft.koloboke.function.CharShortPredicate

        map.put((char) 11, (short) 22);
        map.put((char) 12, (short) 23);
        map.put((char) 13, (short) 24);
        map.put((char) 14, (short) 25);
        map.remove((char) 13);
        map.forEachWhile(new CharShortPredicate() {

            @Override
            public boolean test(char first, short second) {
                pairs.add(new Pair(first, second));
                return true;
            }
        });

        Collections.sort(pairs);
        assertEquals(3, pairs.size());
        assertEquals((char) 11, pairs.get(0).k /* keyEpsilon */);
        assertEquals((short) 22, pairs.get(0).v /* valueEpsilon */);
        assertEquals((char) 12, pairs.get(1).k /* keyEpsilon */);
        assertEquals((short) 23, pairs.get(1).v /* valueEpsilon */);
        assertEquals((char) 14, pairs.get(2).k /* keyEpsilon */);
        assertEquals((short) 25, pairs.get(2).v /* valueEpsilon */);

        pairs.clear();
        map.forEachWhile(new CharShortPredicate() {
            int count = 0;

            @Override
            public boolean test(char first, short second) {
                pairs.add(new Pair(first, second));

Examples of net.openhft.koloboke.function.CharShortPredicate

        map.put((char) 11, (short) 22);
        map.put((char) 12, (short) 23);
        map.put((char) 13, (short) 24);
        map.put((char) 14, (short) 25);
        map.remove((char) 13);
        map.removeIf(new CharShortPredicate() {
            @Override
            public boolean test(char first, short second) {
                return (first % 2) != 0;
            }
        });
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.