Examples of containsKey()


Examples of net.minidev.json.JSONObject.containsKey()

        logger.warn("warning dawg");
        String message = appender.getMessages()[0];
        Object obj = JSONValue.parse(message);
        JSONObject jsonObject = (JSONObject) obj;

        Assert.assertFalse("atFields contains file value", jsonObject.containsKey("file"));
        Assert.assertFalse("atFields contains line_number value", jsonObject.containsKey("line_number"));
        Assert.assertFalse("atFields contains class value", jsonObject.containsKey("class"));
        Assert.assertFalse("atFields contains method value", jsonObject.containsKey("method"));

        // Revert the change to the layout to leave it as we found it.
View Full Code Here

Examples of net.myrrix.common.collection.FastByIDFloatMap.containsKey()

    FastByIDMap<float[]> result = new FastByIDMap<float[]>();
    for (FastByIDMap.MapEntry<FastByIDFloatMap> entry : input.entrySet()) {
      float[] rowOrCol = new float[n];
      FastByIDFloatMap inputValues = entry.getValue();
      for (int i = 0; i < n; i++) {
        if (inputValues.containsKey(idsInOrder[i])) {
          rowOrCol[i] = 1.0f;
        }
      }
      result.put(entry.getKey(), rowOrCol);
    }
View Full Code Here

Examples of net.openhft.collections.SharedHashMap.containsKey()

     * containsKey returns true for contained key
     */
    @Test
    public void testContainsKey() throws IOException {
        SharedHashMap map = map5();
        assertTrue(map.containsKey(one));
        assertFalse(map.containsKey(zero));
    }

    /**
     * containsValue returns true for held values
View Full Code Here

Examples of net.openhft.koloboke.collect.map.ByteIntMap.containsKey()

        assertEquals(capacity, asDHash.capacity());
        assertEquals(capacity - 1, sizeByValueIterator(map));
        assertTrue(asDHash.freeValue() != 0 && asDHash.removedValue() == 1 ||
                asDHash.freeValue() == 1 && asDHash.removedValue() != 0);
        assertTrue(map.containsKey((byte) 0));
        assertFalse(map.containsKey((byte) 1));
    }

    private static String toString(String prefix, SeparateKVByteIntDHash hash) {
        return prefix +
View Full Code Here

Examples of net.sf.json.JSONObject.containsKey()

    }
  }
 
  private DoubanShuoRelation determineRelation (String result) {
    JSONObject obj = JSONObject.fromObject(result.trim());
    if (obj.containsKey("source") && obj.containsKey("target")) {
      JSONObject source = obj.getJSONObject("source");
      boolean following = source.getBoolean("following");
      boolean followedBy = source.getBoolean("followed_by");
      if (following && (!followedBy)) {
        return DoubanShuoRelation.FollowingOnly;
View Full Code Here

Examples of net.sourceforge.stripes.validation.ValidationErrors.containsKey()

            ParameterName name = entry.getKey();

            try {
                String pname = name.getName(); // exact name of the param in the request
                if (!StripesConstants.SPECIAL_URL_KEYS.contains(pname)
                        && !fieldErrors.containsKey(pname)) {
                    log.trace("Running binding for property with name: ", name);

                    // Determine the target type
                    ValidationMetadata validationInfo = validationInfos.get(name.getStrippedName());
                    PropertyExpressionEvaluation eval;
View Full Code Here

Examples of net.visualillusionsent.utils.PropertiesFile.containsKey()

        try {
            File file = new File("plugins/" + filename);
            String jarName = filename.substring(0, filename.lastIndexOf("."));
            inf = new PropertiesFile(file.getAbsolutePath(), "Canary.inf");

            if (!inf.containsKey("main-class")) {
                Canary.logSevere("Failed to read main-class for '" + file.getName() + "' in Canary.inf Please specify a main-class entry in Canary.inf");
                return null;
            }
            inf.setString("jarName", jarName);
            inf.setString("jarPath", "plugins/".concat(filename));
View Full Code Here

Examples of net.yacy.cora.protocol.RequestHeader.containsKey()

       
        /*
         * doing some header validation here ...
         */
        String httpVersion = (String) prop.get(HeaderFramework.CONNECTION_PROP_HTTP_VER); if (httpVersion == null) httpVersion = "HTTP/0.9";
        if (httpVersion.equals("HTTP/1.1") && !header.containsKey(HeaderFramework.HOST)) {
            // the HTTP/1.1 specification requires that an HTTP/1.1 server must reject any 
            // HTTP/1.1 message that does not contain a Host header.           
            HTTPDemon.sendRespondError(prop,theSession.out,0,400,null,null,null);
            throw new IOException("400 Bad request");
        }    
View Full Code Here

Examples of net.yacy.cora.protocol.ResponseHeader.containsKey()

    String directory = "";
    if (proxyurl.getPath().lastIndexOf('/') > 0)
      directory = proxyurl.getPath().substring(0, proxyurl.getPath().lastIndexOf('/'));

    if (outgoingHeader.containsKey("Location")) {
      // rewrite location header
      String location = outgoingHeader.get("Location");
      if (location.startsWith("http")) {
        location = "/proxy.html?url=" + location;
      } else {
View Full Code Here

Examples of oauth.signpost.http.HttpParameters.containsKey()

   * @return an exception to throw for the given content
   */
  private BellaDatiRuntimeException buildException(int code, byte[] content, boolean hasToken) {
    try {
      HttpParameters oauthParams = OAuth.decodeForm(new ByteArrayInputStream(content));
      if (oauthParams.containsKey("oauth_problem")) {
        String problem = oauthParams.getFirst("oauth_problem");
        if ("missing_consumer".equals(problem) || "invalid_consumer".equals(problem)) {
          return new AuthorizationException(Reason.CONSUMER_KEY_UNKNOWN);
        } else if ("invalid_signature".equals(problem) || "signature_invalid".equals(problem)) {
          return new AuthorizationException(hasToken ? Reason.TOKEN_INVALID : Reason.CONSUMER_SECRET_INVALID);
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.