Package cern.colt.function

Examples of cern.colt.function.IntObjectProcedure


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


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

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

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

public void pairsMatching(final IntObjectProcedure condition, final IntArrayList keyList, final ObjectArrayList valueList) {
  keyList.clear();
  valueList.clear();
 
  forEachPair(
    new IntObjectProcedure() {
      public boolean apply(int 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 IntObjectProcedure() {
      public boolean apply(int iterKey, Object iterValue) {
        return (value != iterValue);
      }
    }
  );
View Full Code Here

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

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

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

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

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

            if (dirtyTierIndex < 0 || dirtyTierIndex >= hs.getTiers().size())
            {
                break;
            }
            OpenIntObjectHashMap dirtyTierVertices = (OpenIntObjectHashMap) hs.getTiers().get(dirtyTierIndex);
            dirtyTierVertices.forEachPair(new IntObjectProcedure()
            {
                public boolean apply(int key, Object value)
                {
                    ((IVertex) value).markDirty();
                    return true;
                }
            });
        }
        tierIndex++;
        while (tierIndex < hs.getTiers().size())
        {
            OpenIntObjectHashMap dirtyTierVertices = (OpenIntObjectHashMap) hs.getTiers().get(tierIndex);
            dirtyTierVertices.forEachPair(new IntObjectProcedure()
            {
                public boolean apply(int key, Object value)
                {
                    ((IVertex) value).markDirty();
                    return true;
View Full Code Here

                                    getLegendName(ctsTier.getBName()),
                                    getLegendName(ctsTier.getCName()),
                                    tierIndex + 1)),
                                widthOfValuesArea, y);

            tier.forEachPair(new IntObjectProcedure()
            {
                public boolean apply(int tierKey, Object value)
                {
                    IVertex vertex = (IVertex) value;
                   
View Full Code Here

TOP

Related Classes of cern.colt.function.IntObjectProcedure

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.