Examples of CharPredicate


Examples of com.carrotsearch.hppc.predicates.CharPredicate

    @Override
    public int retainAll(final CharLookupContainer c)
    {
        // We know c holds sub-types of char and we're not modifying c, so go unchecked.
        final CharContainer c2 = (CharContainer) c;
        return this.removeAll(new CharPredicate()
        {
            public boolean apply(char k)
            {
                return !c2.contains(k);
            }
View Full Code Here

Examples of com.carrotsearch.hppc.predicates.CharPredicate

     * and negates the predicate.
     */
    @Override
    public int retainAll(final CharPredicate predicate)
    {
        return removeAll(new CharPredicate()
        {
            public boolean apply(char value)
            {
                return !predicate.apply(value);
            };
View Full Code Here

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

        return true;
    }

    public boolean containsAll(CharIterable source)
    {
        return source.allSatisfy(new CharPredicate()
        {
            public boolean accept(char value)
            {
                return LongCharHashMap.this.contains(value);
            }
View Full Code Here

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

     * @deprecated since 3.0.
     */
    @Deprecated
    public static int count(String string, final com.gs.collections.impl.block.predicate.primitive.CharPredicate predicate)
    {
        return StringIterate.count(string, new CharPredicate()
        {
            public boolean accept(char value)
            {
                return predicate.accept(value);
            }
View Full Code Here

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

    /**
     * Count the number of occurrences of the specified char.
     */
    public static int occurrencesOf(String string, final char value)
    {
        return StringIterate.count(string, new CharPredicate()
        {
            public boolean accept(char character)
            {
                return value == character;
            }
View Full Code Here

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

        return this.containsAll(CharSets.immutable.of(source));
    }

    public boolean containsAll(CharIterable source)
    {
        return source.allSatisfy(new CharPredicate()
        {
            public boolean accept(char value)
            {
                return AbstractLazyCharIterable.this.contains(value);
            }
View Full Code Here

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

        return true;
    }

    public boolean containsAll(CharIterable source)
    {
        return source.allSatisfy(new CharPredicate()
        {
            public boolean accept(char each)
            {
                return CharHashBag.this.contains(each);
            }
View Full Code Here

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

    public boolean retainAll(CharIterable source)
    {
        int oldSize = this.size();
        final CharSet sourceSet = source instanceof CharSet ? (CharSet) source : source.toSet();
        CharHashBag retained = this.select(new CharPredicate()
        {
            public boolean accept(char key)
            {
                return sourceSet.contains(key);
            }
View Full Code Here

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

        if (this.sizeDistinct() != bag.sizeDistinct())
        {
            return false;
        }

        return this.items.keysView().allSatisfy(new CharPredicate()
        {
            public boolean accept(char key)
            {
                return CharHashBag.this.occurrencesOf(key) == bag.occurrencesOf(key);
            }
View Full Code Here

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

    public boolean retainAll(CharIterable source)
    {
        int oldSize = this.size();
        final CharSet sourceSet = source instanceof CharSet ? (CharSet) source : source.toSet();
        CharArrayList retained = this.select(new CharPredicate()
        {
            public boolean accept(char value)
            {
                return sourceSet.contains(value);
            }
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.