Examples of CharIntProcedure


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

    }

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

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

    }

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

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

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

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

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

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

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

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

    public void putAll(CharIntMap map)
    {
        map.forEachKeyValue(new CharIntProcedure()
        {
            public void value(char key, int value)
            {
                CharIntHashMap.this.put(key, value);
            }
View Full Code Here

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

   *
   * @return <tt>true</tt> if the receiver contains the specified value.
   */
  public boolean containsValue(final int value) {
    return !forEachPair(
        new CharIntProcedure() {
          @Override
          public boolean apply(char iterKey, int iterValue) {
            return (value != iterValue);
          }
        }
View Full Code Here

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

      return false;
    }

    return
        forEachPair(
            new CharIntProcedure() {
              @Override
              public boolean apply(char key, int value) {
                return other.containsKey(key) && other.get(key) == value;
              }
            }
        )
            &&
            other.forEachPair(
                new CharIntProcedure() {
                  @Override
                  public boolean apply(char key, int value) {
                    return containsKey(key) && get(key) == value;
                  }
                }
View Full Code Here

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

                           final IntArrayList valueList) {
    keyList.clear();
    valueList.clear();

    forEachPair(
        new CharIntProcedure() {
          @Override
          public boolean apply(char key, int value) {
            if (condition.apply(key, value)) {
              keyList.add(key);
              valueList.add(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.