Examples of containsKey()


Examples of io.ADXIniParser.containsKey()

  public void init(ADXGame game) {
   
    // Load options
    ADXIniParser ini = new ADXIniParser(optionPath);
    if (ini.containsCategory("GLOBAL")) {
      if (ini.containsKey("GLOBAL", "gridXSize")) {
        gridXSize = ini.getIntValue("GLOBAL", "gridXSize");
      }
      if (ini.containsKey("GLOBAL", "gridYSize")) {
        gridYSize = ini.getIntValue("GLOBAL", "gridYSize");
      }
View Full Code Here

Examples of io.vertx.core.json.JsonObject.containsKey()

    eb.<JsonObject>consumer("foo").handler((Message<JsonObject> msg) -> {
      msg.body().put("b", "uqwduihwqd");
    });
    eb.send("foo", obj);
    vertx.setTimer(1000, id -> {
      assertFalse(obj.containsKey("b"));
      testComplete();
    });
    await();
  }
View Full Code Here

Examples of it.unimi.dsi.fastutil.ints.Int2FloatMap.containsKey()

      floats[i] = k;
    }

    for (int i = 0; i < size; i++) {
      assertEquals(floats[i], map.get(i), 10e-6);
      assertTrue(map.containsKey(i));
    }

  }

  @Test
View Full Code Here

Examples of it.unimi.dsi.fastutil.ints.Int2FloatOpenHashMap.containsKey()

          iterator = messages.getVertexIdMessageIterator();
      while (iterator.hasNext()) {
        iterator.next();
        int vertexId = iterator.getCurrentVertexId().get();
        float message = iterator.getCurrentMessage().get();
        if (partitionMap.containsKey(vertexId)) {
          reusableVertexId.set(vertexId);
          reusableMessage.set(message);
          reusableCurrentMessage.set(partitionMap.get(vertexId));
          messageCombiner.combine(reusableVertexId, reusableCurrentMessage,
              reusableMessage);
View Full Code Here

Examples of it.unimi.dsi.fastutil.ints.Int2IntMap.containsKey()

    assertEquals(size, map.size());

    for (int i = 0; i < size; i++) {
      assertEquals(ints[i] + 1, map.get(i));
      assertTrue(map.containsKey(i));
    }
  }

  @Test
  public void testPlus() throws IOException {
View Full Code Here

Examples of it.unimi.dsi.fastutil.ints.Int2IntOpenHashMap.containsKey()

    public int containKeys(int [] keys)
    {
        final Int2IntOpenHashMap instance = this.instance;
        int count = 0;
        for (int i = 0; i < keys.length; i++)
            count += instance.containsKey(keys[i]) ? 1 : 0;
        return count;
    }
   
    @Override
    public int putAll(int [] keys, int [] values)
View Full Code Here

Examples of it.unimi.dsi.fastutil.longs.Long2DoubleOpenHashMap.containsKey()

            if (prefMap.isEmpty()) {
                user = p.getUserId();
            } else if (user != p.getUserId()) {
                throw new IllegalArgumentException("multiple user IDs in pref array");
            }
            if (prefMap.containsKey(iid)) {
                throw new IllegalArgumentException("item " + iid + " occurs multiple times");
            } else {
                prefMap.put(iid, p.getValue());
            }
        }
View Full Code Here

Examples of it.unimi.dsi.util.Properties.containsKey()

  @SuppressWarnings("unchecked")
  static public Index getInstance( final CharSequence basename, final boolean randomAccess, final boolean documentSizes, final EnumMap<UriKeys,String> queryProperties ) throws ConfigurationException, IOException, ClassNotFoundException, SecurityException, URISyntaxException, InstantiationException, IllegalAccessException, InvocationTargetException, NoSuchMethodException {
    final Properties properties = new Properties( basename + DiskBasedIndex.PROPERTIES_EXTENSION );
    ClusteringStrategy strategy = null;
    Class<? extends ClusteringStrategy> strategyClass = null;
    if ( properties.containsKey( PropertyKeys.STRATEGY ) ) strategy = (ClusteringStrategy)BinIO.loadObject( properties.getString( PropertyKeys.STRATEGY ) );
    else if ( properties.containsKey( PropertyKeys.STRATEGYCLASS ) ) try {
      strategyClass = (Class<? extends ClusteringStrategy>)MG4JClassParser.getParser().parse( properties.getString( PropertyKeys.STRATEGYCLASS ) );
    }
    catch ( ParseException e ) {
      throw new RuntimeException( e );
View Full Code Here

Examples of java.awt.RenderingHints.containsKey()

                // Nothing changed: return the source directly.
                return src;
            } else {
                // Remove TileCache hint from RenderingHints if present.
                RenderingHints hints = renderHints;
                if(hints != null && hints.containsKey(JAI.KEY_TILE_CACHE)) {
                    hints = new RenderingHints((Map)renderHints);
                    hints.remove(JAI.KEY_TILE_CACHE);
                }

                // Only the ColorModel is changing.
View Full Code Here

Examples of java.util.AbstractMap.containsKey()

     * @tests java.util.AbstractMap#containsKey(Object)
     */
    public void test_containsKey() {
        AbstractMap map = new AMT();

        assertFalse(map.containsKey("k"));
        assertFalse(map.containsKey(null));

        map.put("k", "v");
        map.put("key", null);
        map.put(null, "value");
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.