Package cern.colt.function

Examples of cern.colt.function.LongObjectProcedure


        VarPairsIndexFactory.getInstance().buildIndex(cts);
       
        VarPairsIndex index = VarPairsIndexFactory.getInstance().
            buildPartialIndex(cts, (ICompactTripletsStructureHolder) cts.get(0), 0, 0);
       
        index.forEachPair(new LongObjectProcedure()
        {
            public boolean apply(long key, Object value)
            {
                int varName1_ = (int) (key >> 21);
                int varName2_ = (int) (key & 0x1FFFFF);
View Full Code Here


        final AbstractLongObjectMap map = new OpenLongObjectHashMap(size);
        for (int i = 1; i <= size; i++) {
            map.put(size, "O" + i);
        }
        time = System.currentTimeMillis();
        map.forEachPair(new LongObjectProcedure() {
            @Override
            public boolean apply(long l, Object o) {
                if (l % modulo == 0) {
                    map.put(l, "T" + l);
                }
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

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.