Package java.util

Examples of java.util.Map.containsKey()


      assertTrue("Missing property", props.containsKey("nodeClass"));
      assertTrue("Missing property", props.containsKey("node"));
      assertTrue("Missing property", props.containsKey("action"));
      assertTrue("Missing property", props.containsKey("p1"));
      assertFalse("Property to much", props.containsKey("izar"));

      // for some reason, they don't work :-(
//      assertEquals("wrong value", "node", props.get("nodeClass"));
//      assertEquals("wrong value", "izar", props.get("node"));
//      assertEquals("wrong value", "action", props.get("initReplication"));
View Full Code Here


         Map map = StringPairTokenizer.CSVToMap(line);
         String result = StringPairTokenizer.mapToCSV(map);
         map = StringPairTokenizer.CSVToMap(result);
         assertEquals(4, map.size());
         assertEquals(null, (String)map.get("aNullKey"));
         assertTrue(map.containsKey("aNullKey"));
         assertEquals("", (String)map.get("otherEmptyKey"));
         assertEquals("", (String)map.get("thirdKey"));
         assertEquals("Blanks", (String)map.get("fourthKey"));
         assertNull(map.get("bla"));
         log.info(line);
View Full Code Here

                    for (int k = 0; k < pageVariables.size(); k++)
                    {
                        final StrutsParameter pageVariable = (StrutsParameter)pageVariables.get(k);
                        if (argumentNames.contains(pageVariable.getName()))
                        {
                            if (!formFieldsMap.containsKey(pageVariable.getName()) || pageVariable.isTable())
                            {
                                formFieldsMap.put(pageVariable.getName(), pageVariable);
                            }
                        }
                    }
View Full Code Here

        // since all arguments need to be present we add those that haven't yet been stored in the map
        for (final Iterator argumentIterator = arguments.iterator(); argumentIterator.hasNext();)
        {
            final StrutsParameter argument = (StrutsParameter)argumentIterator.next();
            if (!formFieldsMap.containsKey(argument.getName()))
            {
                formFieldsMap.put(argument.getName(), argument);
            }
        }
View Full Code Here

    private String getDeclaredLetVariableValue(String variableName)
    {
        for (final Iterator iterator = letVariableStack.iterator(); iterator.hasNext();)
        {
            Map variableMap = (Map)iterator.next();
            if (variableMap.containsKey(variableName))
            {
                return (String)variableMap.get(variableName);
            }
        }
        return null;
View Full Code Here

                        {
                            value = StringUtils.replace(
                                    value,
                                    this.environmentVariablePrefix,
                                    "");
                            if (environment.containsKey(value))
                            {
                                value = ObjectUtils.toString(environment.get(value)).trim();
                            }
                        }
                        this.executionProperties.put(
View Full Code Here

                    // remove from the map of unprocessed mappings
                    iterator.remove();
                    // set the flag
                    processed = true;
                }
                else if (processedMappings.containsKey(mappings.extendsUri))
                {
                    final Mappings parentMappings = (Mappings)processedMappings.get(mappings.extendsUri);
                    if (parentMappings != null)
                    {
                        mergeWithoutOverriding(parentMappings, mappings);
View Full Code Here

                final Collection forwardParameters = forward.getForwardParameters();
                for (final Iterator forwardParameterIterator = forwardParameters.iterator();
                     forwardParameterIterator.hasNext();)
                {
                    final ModelElementFacade facade = (ModelElementFacade) forwardParameterIterator.next();
                    if (!formFieldMap.containsKey(facade.getName()))
                    {
                        formFieldMap.put(facade.getName(), facade);
                    }
                }
            }
View Full Code Here

    public static void main(String argv[]) throws Exception {

        // Load args from the config file
        Map options = Launcher.loadArgsFromCommandLineAndConfig(argv, "operation");
        String operation = (String) options.get("operation");
        if (options.containsKey("controlPort") && !options.containsKey("port")) {
            options.put("port", options.get("controlPort"));
        }

        if (operation.equals("")) {
            printUsage();
View Full Code Here

    public static void main(String argv[]) throws Exception {

        // Load args from the config file
        Map options = Launcher.loadArgsFromCommandLineAndConfig(argv, "operation");
        String operation = (String) options.get("operation");
        if (options.containsKey("controlPort") && !options.containsKey("port")) {
            options.put("port", options.get("controlPort"));
        }

        if (operation.equals("")) {
            printUsage();
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.