Examples of IntIntProcedure


Examples of cern.colt.function.IntIntProcedure

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

Examples of cern.colt.function.IntIntProcedure

  final AbstractIntIntMap other = (AbstractIntIntMap) obj;
  if (other.size() != size()) return false;

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

Examples of cern.colt.function.IntIntProcedure

*       returns <tt>Integer.MIN_VALUE</tt> if no such key exists.
*/
public int keyOf(final int value) {
  final int[] foundKey = new int[1];
  boolean notFound = forEachPair(
    new IntIntProcedure() {
      public boolean apply(int iterKey, int iterValue) {
        boolean found = value == iterValue;
        if (found) foundKey[0] = iterKey;
        return !found;
      }
View Full Code Here

Examples of cern.colt.function.IntIntProcedure

public void pairsMatching(final IntIntProcedure condition, final IntArrayList keyList, final IntArrayList valueList) {
  keyList.clear();
  valueList.clear();
 
  forEachPair(
    new IntIntProcedure() {
      public boolean apply(int key, int value) {
        if (condition.apply(key,value)) {
          keyList.add(key);
          valueList.add(value);
        }
View Full Code Here

Examples of cern.colt.function.IntIntProcedure

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

Examples of cern.colt.function.IntIntProcedure

  final AbstractIntIntMap other = (AbstractIntIntMap) obj;
  if (other.size() != size()) return false;

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

Examples of cern.colt.function.IntIntProcedure

*       returns <tt>Integer.MIN_VALUE</tt> if no such key exists.
*/
public int keyOf(final int value) {
  final int[] foundKey = new int[1];
  boolean notFound = forEachPair(
    new IntIntProcedure() {
      public boolean apply(int iterKey, int iterValue) {
        boolean found = value == iterValue;
        if (found) foundKey[0] = iterKey;
        return !found;
      }
View Full Code Here

Examples of cern.colt.function.IntIntProcedure

public void pairsMatching(final IntIntProcedure condition, final IntArrayList keyList, final IntArrayList valueList) {
  keyList.clear();
  valueList.clear();

  forEachPair(
    new IntIntProcedure() {
      public boolean apply(int key, int value) {
        if (condition.apply(key,value)) {
          keyList.add(key);
          valueList.add(value);
        }
View Full Code Here

Examples of com.almworks.integers.func.IntIntProcedure

          @Override
          public int invoke(int a, int b) {
            return IntCollections.compare(sorted.get(a), sorted.get(b));
          }
        },
        new IntIntProcedure() {
          @Override
          public void invoke(int a, int b) {
            sorted.swap(a, b);
            perms.swap(a, b);
          }
View Full Code Here

Examples of com.almworks.integers.func.IntIntProcedure

            int comp = IntCollections.compare(primary.get(i), primary.get(j));
            if (comp == 0) comp = IntCollections.compare(secondary.get(i), secondary.get(j));
            return comp;
          }
        },
        new IntIntProcedure() {
          @Override
          public void invoke(int i, int j) {
            primary.swap(i, j);
            secondary.swap(i, j);
          }
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.