Examples of LongIntProcedure


Examples of com.gs.collections.api.block.procedure.primitive.LongIntProcedure

    }

    public LongHashBag reject(final LongPredicate predicate)
    {
        final LongHashBag result = new LongHashBag();
        this.forEachWithOccurrences(new LongIntProcedure()
        {
            public void value(long each, int occurrences)
            {
                if (!predicate.accept(each))
                {
View Full Code Here

Examples of com.gs.collections.api.block.procedure.primitive.LongIntProcedure

    @Override
    public int hashCode()
    {
        final Counter result = new Counter();
        this.forEachWithOccurrences(new LongIntProcedure()
        {
            public void value(long eachItem, int occurrences)
            {
                result.add((int) (eachItem ^ eachItem >>> 32) ^ occurrences);
            }
View Full Code Here

Examples of com.gs.collections.api.block.procedure.primitive.LongIntProcedure

    {
        final boolean[] firstItem = {true};
        try
        {
            appendable.append(start);
            this.items.forEachKeyValue(new LongIntProcedure()
            {
                public void value(long each, int occurrences)
                {
                    try
                    {
View Full Code Here

Examples of com.gs.collections.api.block.procedure.primitive.LongIntProcedure

    }

    public int count(final LongPredicate predicate)
    {
        final Counter result = new Counter();
        this.forEachWithOccurrences(new LongIntProcedure()
        {
            public void value(long each, int occurrences)
            {
                if (predicate.accept(each))
                {
View Full Code Here

Examples of com.gs.collections.api.block.procedure.primitive.LongIntProcedure

    }

    public <V> MutableBag<V> collect(final LongToObjectFunction<? extends V> function)
    {
        final HashBag<V> result = HashBag.newBag(this.items.size());
        this.forEachWithOccurrences(new LongIntProcedure()
        {
            public void value(long each, int occurrences)
            {
                result.addOccurrences(function.valueOf(each), occurrences);
            }
View Full Code Here

Examples of com.gs.collections.api.block.procedure.primitive.LongIntProcedure

    }

    public long sum()
    {
        final long[] result = {0L};
        this.forEachWithOccurrences(new LongIntProcedure()
        {
            public void value(long each, int occurrences)
            {
                result[0] += (long) each * occurrences;
            }
View Full Code Here

Examples of com.gs.collections.api.block.procedure.primitive.LongIntProcedure

    public long[] toArray()
    {
        final long[] array = new long[this.size()];
        final int[] index = {0};

        this.forEachWithOccurrences(new LongIntProcedure()
        {
            public void value(long each, int occurrences)
            {
                for (int i = 0; i < occurrences; i++)
                {
View Full Code Here

Examples of com.gs.collections.api.block.procedure.primitive.LongIntProcedure

    public void writeExternal(final ObjectOutput out) throws IOException
    {
        out.writeInt(this.items.size());
        try
        {
            this.items.forEachKeyValue(new LongIntProcedure()
            {
                public void value(long each, int occurrences)
                {
                    try
                    {
View Full Code Here

Examples of com.gs.collections.api.block.procedure.primitive.LongIntProcedure

        this.addKeyValueAtIndex(key, value, index);
    }

    public void putAll(LongIntMap map)
    {
        map.forEachKeyValue(new LongIntProcedure()
        {
            public void value(long key, int value)
            {
                LongIntHashMap.this.put(key, value);
            }
View Full Code Here

Examples of org.apache.mahout.math.function.LongIntProcedure

   *
   * @return <tt>true</tt> if the receiver contains the specified value.
   */
  public boolean containsValue(final int value) {
    return !forEachPair(
        new LongIntProcedure() {
          @Override
          public boolean apply(long iterKey, int iterValue) {
            return (value != iterValue);
          }
        }
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.