Examples of containsKey()


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

                iter.advance();
                Object key = iter.key();
                short value = iter.value();
                if ( value == no_entry_value ) {
                    if ( !( that.get( key ) == that.getNoEntryValue() &&
                      that.containsKey( key ) ) ) {

                        return false;
                    }
                } else {
                    if ( value != that.get( key ) ) {
View Full Code Here

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

            while ( iter.hasNext() ) {
                iter.advance();
                short 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.hash.TIntDoubleHashMap.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

Examples of gnu.trove.map.hash.TIntFloatHashMap.containsKey()

            cursor = 0;
            while (cursor < pairs.length) {
                int pos = pairs[cursor++];
                float val = (float) pairs[cursor++];
                if (results.containsKey(pos)) {
                    val = results.get(pos) + val;
                    results.put(pos, val);
                    if (val > max) {
                        max = val;
                    }
View Full Code Here

Examples of gnu.trove.map.hash.TIntIntHashMap.containsKey()

  private static Propagator createProp(IntVar[] vars, int[] values, IntVar[] cards) {
    assert values.length == cards.length;
    TIntIntHashMap map = new TIntIntHashMap();
    int idx = 0;
    for (int v : values) {
      if (!map.containsKey(v)) {
        map.put(v, idx);
        idx++;
      } else {
        throw new UnsupportedOperationException("ERROR: multiple occurrences of value: " + v);
      }
View Full Code Here

Examples of gnu.trove.map.hash.TLongLongHashMap.containsKey()

    for (int i = 0; i < values.length; ++i) {
      map.put(values[i], values[values.length - i - 1]);
    }
   
    for (int i = 0; i < values.length; ++i) {
      assertTrue(map.containsKey(values[i]));
    }
   
    for (int i = 0; i < values.length; ++i) {
      map.remove(values[i]);
    }
View Full Code Here

Examples of grails.web.mvc.FlashScope.containsKey()

        assertFalse(fs.isEmpty());
        assertEquals("flintstone",fs.get("fred"));
        assertEquals("rubble",fs.get("barney"));
        assertEquals(3, fs.size());
        assertTrue(fs.containsKey("test"));
        assertTrue(fs.containsKey("barney"));
        assertTrue(fs.containsValue("value"));
        assertFalse(fs.containsKey("wilma"));

        // the state immediately following this one the map should still contain the previous entries
View Full Code Here

Examples of gumi.builders.url.UrlParameterMultimap.containsKey()

    }
   
    @Test
    public void containsKey() {
        UrlParameterMultimap parameterMap = newMapWithContent();
        assertTrue(parameterMap.containsKey("key1"));
        assertFalse(parameterMap.containsKey("key2"));
    }

    @Test
    public void containsValue() {
View Full Code Here

Examples of hudson.EnvVars.containsKey()

                env.put("HUDSON_URL", rootUrl);
                env.put("BUILD_URL", rootUrl + b.getUrl());
                env.put("JOB_URL", rootUrl + p.getUrl());
            }

            if (!env.containsKey("HUDSON_HOME")) {
                env.put("HUDSON_HOME", Hudson.getInstance().getRootDir().getPath());
            }

            if (ws != null) {
                env.put("WORKSPACE", ws.getRemote());
View Full Code Here

Examples of info.ata4.unity.serdes.db.FieldTypeMap.containsKey()

            System.out.print(rev);
            System.out.print(" |");
           
            for (Integer classID : classIDs) {
                System.out.print("  ");
                if (ftm.containsKey(new ImmutablePair(classID, rev))) {
                    System.out.print("x");
                } else {
                    System.out.print(" ");
                }
                System.out.print("  |");
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.