Package cern.colt.function

Examples of cern.colt.function.LongIntProcedure


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


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

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

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

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

TOP

Related Classes of cern.colt.function.LongIntProcedure

Copyright © 2018 www.massapicom. 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.