Package java.util

Examples of java.util.Map.containsKey()


      assert "zzzzz".equals(m.get("bar"));

      Type t = RemotingTest.class.getMethod("dummyMap").getGenericReturnType();
      m = (Map) wrapper.convert(t);
      assert m.containsKey("foo");
      assert m.containsKey("bar");
      assert "aaaaa".equals(m.get("foo"));
      assert "zzzzz".equals(m.get("bar"));

      try
      {
View Full Code Here


            decodedMap = Collections.EMPTY_MAP;
          }

          if (opId.equals(DisplayListener.OP_OPEN_URL)) {
            String url = MapUtils.getMapString(decodedMap, "url", null);
            if (!decodedMap.containsKey("target")) {
              context.debug("no target for url: " + url);
            } else if (UrlFilter.getInstance().urlIsBlocked(url)) {
              context.debug("url blocked: " + url);
            } else if (!UrlFilter.getInstance().urlCanRPC(url)) {
              context.debug("url not in whitelistL " + url);
View Full Code Here

              return true;
            }

          } else if (opId.equals(TorrentListener.OP_LOAD_TORRENT)) {
            if (decodedMap.containsKey("b64")) {
              String b64 = MapUtils.getMapString(decodedMap, "b64", null);
              return TorrentListener.loadTorrentByB64(core, b64);
            } else if (decodedMap.containsKey("url")) {
              String url = MapUtils.getMapString(decodedMap, "url", null);
View Full Code Here

          } else if (opId.equals(TorrentListener.OP_LOAD_TORRENT)) {
            if (decodedMap.containsKey("b64")) {
              String b64 = MapUtils.getMapString(decodedMap, "b64", null);
              return TorrentListener.loadTorrentByB64(core, b64);
            } else if (decodedMap.containsKey("url")) {
              String url = MapUtils.getMapString(decodedMap, "url", null);

              boolean blocked = UrlFilter.getInstance().urlIsBlocked(url);
              // Security: Only allow torrents from whitelisted urls
              if (blocked) {
View Full Code Here

          } else if (opId.equals("is-ready")) {
            // The platform needs to know when it can call open-url, and it
            // determines this by the is-ready function
            return mainWindow.isReady();
          } else if (opId.equals("is-version-ge")) {
            if (decodedMap.containsKey("version")) {
              String id = MapUtils.getMapString(decodedMap, "id", "client");
              String version = MapUtils.getMapString(decodedMap, "version", "");
              if (id.equals("client")) {
                return org.gudy.azureus2.core3.util.Constants.compareVersions(
                    org.gudy.azureus2.core3.util.Constants.AZUREUS_VERSION,
View Full Code Here

              }
            }
            return false;

          } else if (opId.equals("is-active-tab")) {
            if (decodedMap.containsKey("tab")) {
              String tabID = MapUtils.getMapString(decodedMap, "tab", "");
              if (tabID.length() > 0) {
                // 3.2 TODO: Should we be checking for partial matches?
                MultipleDocumentInterface mdi = UIFunctionsManager.getUIFunctions().getMDI();
                MdiEntry entry = mdi.getCurrentEntry();
View Full Code Here

        }
       
        // obtain the requested help text
        Map helpmap = module.getHelpMap();
        if (null == helpmap ||
          !helpmap.containsKey(help_key))
        {
          bot.send(new Privmsg(nick, "Couldn't find the requested help information in module '"+module_name+"'."));
          return;
        }
       
View Full Code Here

        for (int i = 0; i < tags.length; i++) {
            EjbValueObjectFieldTag valueMethodMatchTag = (EjbValueObjectFieldTag) tags[i];
            String methodMatch = valueMethodMatchTag.getMatch();

            if (matchValues.containsKey(methodMatch)) {
                EjbValueObjectFieldTag savedTag = (EjbValueObjectFieldTag) matchValues.get(methodMatch);

                if (log.isWarnEnabled()) {
                    log.warn(EjbUtils.tagToString(valueMethodMatchTag) +
                        " is being ignored because there is already another tag for same match " +
View Full Code Here

                // find properties using write access methods
                setmap = mapPropertyWriteMethods(methods, inclset, exclset);
               
                // discard any read-only properties
                for (Iterator iter = getmap.keySet().iterator(); iter.hasNext();) {
                    if (!setmap.containsKey(iter.next())) {
                        iter.remove();
                    }
                }
               
            }
View Full Code Here

    }

    public static void callLisp (String s, Object o, String as[], int ai[]) {
        if (table.containsKey(o)) {
            Map entryTable =  (Map)table.get(o);
            if (entryTable.containsKey(s)) {
                Function f = ((Entry)entryTable.get(s)).getHandler();
                LispObject data = ((Entry)entryTable.get(s)).getData();
                Fixnum count = ((Entry)entryTable.get(s)).getCount();
                Fixnum[] lispAi = new Fixnum[ai.length];
                for (int i = 0; i < ai.length; i++) {
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.