Examples of IntProcedure


Examples of cern.colt.function.IntProcedure

/**
* Constructs a function that returns <tt>a > b</tt>.
* <tt>a</tt> is a variable, <tt>b</tt> is fixed.
*/
public static IntProcedure isGreater(final int b) {
  return new IntProcedure() {
    public final boolean apply(int a) { return a > b; }
  };
}
View Full Code Here

Examples of cern.colt.function.IntProcedure

/**
* Constructs a function that returns <tt>a < b</tt>.
* <tt>a</tt> is a variable, <tt>b</tt> is fixed.
*/
public static IntProcedure isLess(final int b) {
  return new IntProcedure() {
    public final boolean apply(int a) { return a < b; }
  };
}
View Full Code Here

Examples of cern.colt.function.IntProcedure

*
* @return <tt>true</tt> if the receiver contains the specified key.
*/
public boolean containsKey(final int key) {
  return ! forEachKey(
    new IntProcedure() {
      public boolean apply(int iterKey) {
        return (key != iterKey);
      }
    }
  );
View Full Code Here

Examples of cern.colt.function.IntProcedure

* @param procedure    the procedure to be applied. Stops iteration if the procedure returns <tt>false</tt>, otherwise continues.
* @return <tt>false</tt> if the procedure stopped before all keys where iterated over, <tt>true</tt> otherwise.
*/
public boolean forEachPair(final IntIntProcedure procedure) {
  return forEachKey(
    new IntProcedure() {
      public boolean apply(int key) {
        return procedure.apply(key,get(key));
      }
    }
  );
View Full Code Here

Examples of cern.colt.function.IntProcedure

* @param list the list to be filled, can have any size.
*/
public void keys(final IntArrayList list) {
  list.clear();
  forEachKey(
    new IntProcedure() {
      public boolean apply(int key) {
        list.add(key);
        return true;
      }
    }
View Full Code Here

Examples of cern.colt.function.IntProcedure

* @param list the list to be filled, can have any size.
*/
public void values(final IntArrayList list) {
  list.clear();
  forEachKey(
    new IntProcedure() {
      public boolean apply(int key) {
        list.add(get(key));
        return true;
      }
    }
View Full Code Here

Examples of com.carrotsearch.hppc.procedures.IntProcedure

        // Deques also support iteration through [type]Procedure interfaces.
        // The apply() method will be called once for each element in the deque.
       
        // Iteration from head to tail
        deque.forEach(new IntProcedure()
        {
            public void apply(int value)
            {
                System.out.println(value);
            }
View Full Code Here

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

        return this;
    }

    public IntShortHashMap withoutAllKeys(IntIterable keys)
    {
        keys.forEach(new IntProcedure()
        {
            public void value(int key)
            {
                IntShortHashMap.this.removeKey(key);
            }
View Full Code Here

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

   *
   * @return <tt>true</tt> if the receiver contains the specified key.
   */
  public boolean containsKey(final int key) {
    return !forEachKey(
        new IntProcedure() {
          @Override
          public boolean apply(int iterKey) {
            return (key != iterKey);
          }
        }
View Full Code Here

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

   *                  continues.
   * @return <tt>false</tt> if the procedure stopped before all keys where iterated over, <tt>true</tt> otherwise.
   */
  public boolean forEachPair(final IntDoubleProcedure procedure) {
    return forEachKey(
        new IntProcedure() {
          @Override
          public boolean apply(int key) {
            return procedure.apply(key, get(key));
          }
        }
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.