Examples of DoubleIntProcedure


Examples of cern.colt.function.DoubleIntProcedure

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

Examples of cern.colt.function.DoubleIntProcedure

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

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

Examples of cern.colt.function.DoubleIntProcedure

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

Examples of cern.colt.function.DoubleIntProcedure

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

Examples of cern.colt.function.DoubleIntProcedure

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

Examples of cern.colt.function.DoubleIntProcedure

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

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

Examples of cern.colt.function.DoubleIntProcedure

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

Examples of cern.colt.function.DoubleIntProcedure

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

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

Examples of com.gs.collections.api.block.procedure.primitive.DoubleIntProcedure

        this.addKeyValueAtIndex(key, value, index);
    }

    public void putAll(DoubleIntMap map)
    {
        map.forEachKeyValue(new DoubleIntProcedure()
        {
            public void value(double key, int value)
            {
                DoubleIntHashMap.this.put(key, value);
            }
View Full Code Here

Examples of com.gs.collections.api.block.procedure.primitive.DoubleIntProcedure

    }

    public DoubleHashBag(DoubleHashBag bag)
    {
        this.items = new DoubleIntHashMap(bag.sizeDistinct());
        bag.forEachWithOccurrences(new DoubleIntProcedure()
        {
            public void value(double item, int occurrences)
            {
                DoubleHashBag.this.addOccurrences(item, occurrences);
            }
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.