Package cern.colt.function

Examples of cern.colt.function.LongObjectProcedure


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


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

  return
    forEachPair(
      new LongObjectProcedure() {
        public boolean apply(long key, Object value) {
          return other.containsKey(key) && other.get(key) == value;
        }
      }
    )
    &&
    other.forEachPair(
      new LongObjectProcedure() {
        public boolean apply(long key, Object 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 Object value) {
  final long[] foundKey = new long[1];
  boolean notFound = forEachPair(
    new LongObjectProcedure() {
      public boolean apply(long iterKey, Object iterValue) {
        boolean found = value == iterValue;
        if (found) foundKey[0] = iterKey;
        return !found;
      }
View Full Code Here

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

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

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

  return
    forEachPair(
      new LongObjectProcedure() {
        public boolean apply(long key, Object value) {
          return other.containsKey(key) && other.get(key) == value;
        }
      }
    )
    &&
    other.forEachPair(
      new LongObjectProcedure() {
        public boolean apply(long key, Object 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 Object value) {
  final long[] foundKey = new long[1];
  boolean notFound = forEachPair(
    new LongObjectProcedure() {
      public boolean apply(long iterKey, Object iterValue) {
        boolean found = value == iterValue;
        if (found) foundKey[0] = iterKey;
        return !found;
      }
View Full Code Here

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

        final IPermutation partialPermutation = new SimplePermutation();
       
        final int[] abci = new int[3];
        final int[] abcj = new int[3];
       
        index.forEachPair(new LongObjectProcedure()
        {
            public boolean apply(long key, Object value)
            {
                //  See VarPairsIndex#addTier() for details of key construction
                int varName1 = (int) (key >> 21);
View Full Code Here

         */
        public void purge()
        {
            final LongArrayList toBeRemoved = new LongArrayList();
           
            pairsToTiersIndex.forEachPair(new LongObjectProcedure()
            {
                public boolean apply(long key, Object value)
                {
                    //  List of formulaAndTierIndices
                    LongArrayList tiers = (LongArrayList) value;
View Full Code Here

TOP

Related Classes of cern.colt.function.LongObjectProcedure

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.