Examples of containsKey()


Examples of games.stendhal.server.entity.player.Player.containsKey()

    if (grumpy == null) {
      return null;
    }

    // the target is grumpy, check if the sender is a friend
    if (!targetPlayer.containsKey("buddies", player.getName())) {
      if (grumpy.length() == 0) {
        return playerName + " has a closed mind, and is seeking solitude from all but close friends";
      } else {
        return playerName + " is seeking solitude from all but close friends: " + grumpy;
      }
View Full Code Here

Examples of gnu.trove.TIntDoubleHashMap.containsKey()

    TIntDoubleHashMap diff = new TIntDoubleHashMap();

    for (int i = 0; i < a.numEntries(); i++) {
      int ind = a.getIndexAt(i);
      double val = a.getValueAt(i);
      if (!diff.containsKey(ind)) {
        diff.put(ind, 0);
      }
      diff.put(ind, diff.get(ind) + val);
    }
View Full Code Here

Examples of gnu.trove.TIntFloatHashMap.containsKey()

     
     
      float linkedValue = 0.0f;
                 
      for(int lid : links){
        if(valueMap3.containsKey(lid)){
          linkedValue = valueMap3.get(lid);
          linkedValue += origValue;
          valueMap3.put(lid, linkedValue);
        }
        else {
View Full Code Here

Examples of gnu.trove.TObjectDoubleHashMap.containsKey()

      if (v.IsSeedNode()) {
        TObjectDoubleIterator injLabIter =
            this._labelManager.getLabelScores(v.GetInjectedLabelScores()).iterator();
        while (injLabIter.hasNext()) {
          injLabIter.advance();
          double currVal = classSeedSum.containsKey(injLabIter.key()) ?
            classSeedSum.get(injLabIter.key()) : 0;
          classSeedSum.put(injLabIter.key(), currVal + injLabIter.value());
         
          // add the label to the list of labels
          if (!labels.containsKey(injLabIter.key())) {
View Full Code Here

Examples of gnu.trove.TObjectIntHashMap.containsKey()

        final List sortedMethodTuples = new ArrayList(sortedMethods.size());
        for (Iterator methodsIt = sortedMethods.iterator(); methodsIt.hasNext();) {
            CtMethod method = (CtMethod) methodsIt.next();
            MethodInfo methodInfo = JavassistMethodInfo.getMethodInfo(method, context.getLoader());
            int sequence = 1;
            if (methodSequences.containsKey(method.getName())) {
                sequence = methodSequences.get(method.getName());
                methodSequences.remove(method.getName());
                sequence++;
            }
            methodSequences.put(method.getName(), sequence);
View Full Code Here

Examples of gnu.trove.map.TByteObjectMap.containsKey()

            while ( iter.hasNext() ) {
                iter.advance();
                byte key = iter.key();
                Object value = iter.value();
                if ( value == null ) {
                    if ( !( that.get( key ) == null && that.containsKey( key ) ) ) {
                        return false;
                    }
                } else {
                    if ( !value.equals( that.get( key ) ) ) {
                        return false;
View Full Code Here

Examples of gnu.trove.map.TCharObjectMap.containsKey()

            while ( iter.hasNext() ) {
                iter.advance();
                char key = iter.key();
                Object value = iter.value();
                if ( value == null ) {
                    if ( !( that.get( key ) == null && that.containsKey( key ) ) ) {
                        return false;
                    }
                } else {
                    if ( !value.equals( that.get( key ) ) ) {
                        return false;
View Full Code Here

Examples of gnu.trove.map.TDoubleObjectMap.containsKey()

            while ( iter.hasNext() ) {
                iter.advance();
                double key = iter.key();
                Object value = iter.value();
                if ( value == null ) {
                    if ( !( that.get( key ) == null && that.containsKey( key ) ) ) {
                        return false;
                    }
                } else {
                    if ( !value.equals( that.get( key ) ) ) {
                        return false;
View Full Code Here

Examples of gnu.trove.map.TFloatObjectMap.containsKey()

            while ( iter.hasNext() ) {
                iter.advance();
                float key = iter.key();
                Object value = iter.value();
                if ( value == null ) {
                    if ( !( that.get( key ) == null && that.containsKey( key ) ) ) {
                        return false;
                    }
                } else {
                    if ( !value.equals( that.get( key ) ) ) {
                        return false;
View Full Code Here

Examples of gnu.trove.map.TIntDoubleMap.containsKey()

        TIntDoubleMap classSums = new TIntDoubleHashMap();
        for (WeightedEdge e : edges) {
            int n = (e.to() == v) ? e.from() : e.to();
            int nClass = vertexAssignments[n];
            double weight = e.weight();
            if (classSums.containsKey(nClass)) {
                double curWeight = classSums.get(nClass);
                classSums.put(nClass, weight + curWeight);
            }
            else {
                classSums.put(nClass, weight);
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.