Package java.util

Examples of java.util.LinkedHashMap.containsKey()


            // Tabs
            request.setAttribute("tabs", tabMap.values());       
            TabBean selectedTab =
                (TabBean) request.getPortletSession().getAttribute(SecurityResources.REQUEST_SELECT_TAB);

            if(selectedTab != null && !tabMap.containsKey(selectedTab.getId()))
            {
                selectedTab = null;
            }
           
            if(selectedTab == null)
View Full Code Here


            // Because CollectionProperty.mergeIn will not prevent adding two
            // properties of the same name, we need to select the first value so
            // that this element's values prevail over defaults provided by
            // configuration
            // elements:
            if (!argMap.containsKey(arg.getName())) {
                argMap.put(arg.getName(), arg.getValue());
            }
        }
        return argMap;
    }
View Full Code Here

                        paramValue = tmpParams[1];
                    }
                    if (paramName != null) {
                        String translatedParamValue = translateAndDecode(paramValue);

                        if(queryParams.containsKey(paramName)) {
                            // WW-1619 append new param value to existing value(s)
                            Object currentParam = queryParams.get(paramName);
                            if(currentParam instanceof String) {
                                queryParams.put(paramName, new String[] {
                                        (String) currentParam, translatedParamValue});
View Full Code Here

            mergedParams = UrlHelper.parseQueryString(queryString);
            for (Iterator iterator = contextParameters.entrySet().iterator(); iterator.hasNext();) {
                Map.Entry entry = (Map.Entry) iterator.next();
                Object key = entry.getKey();

                if (!mergedParams.containsKey(key)) {
                    mergedParams.put(key, entry.getValue());
                }
            }
        }
View Full Code Here

        interceptor.init();
        interceptor.intercept(mockActionInvocation);
        interceptor.destroy();

        assertEquals(sessionMap.size(), 3);
        assertTrue(sessionMap.containsKey(MessageStoreInterceptor.actionErrorsSessionKey));
        assertTrue(sessionMap.containsKey(MessageStoreInterceptor.actionMessagesSessionKey));
        assertTrue(sessionMap.containsKey(MessageStoreInterceptor.fieldErrorsSessionKey));

        List actionErrors = (List) sessionMap.get(MessageStoreInterceptor.actionErrorsSessionKey);
        List actionMessages = (List) sessionMap.get(MessageStoreInterceptor.actionMessagesSessionKey);
View Full Code Here

        interceptor.intercept(mockActionInvocation);
        interceptor.destroy();

        assertEquals(sessionMap.size(), 3);
        assertTrue(sessionMap.containsKey(MessageStoreInterceptor.actionErrorsSessionKey));
        assertTrue(sessionMap.containsKey(MessageStoreInterceptor.actionMessagesSessionKey));
        assertTrue(sessionMap.containsKey(MessageStoreInterceptor.fieldErrorsSessionKey));

        List actionErrors = (List) sessionMap.get(MessageStoreInterceptor.actionErrorsSessionKey);
        List actionMessages = (List) sessionMap.get(MessageStoreInterceptor.actionMessagesSessionKey);
        Map fieldErrors = (Map) sessionMap.get(MessageStoreInterceptor.fieldErrorsSessionKey);
View Full Code Here

        interceptor.destroy();

        assertEquals(sessionMap.size(), 3);
        assertTrue(sessionMap.containsKey(MessageStoreInterceptor.actionErrorsSessionKey));
        assertTrue(sessionMap.containsKey(MessageStoreInterceptor.actionMessagesSessionKey));
        assertTrue(sessionMap.containsKey(MessageStoreInterceptor.fieldErrorsSessionKey));

        List actionErrors = (List) sessionMap.get(MessageStoreInterceptor.actionErrorsSessionKey);
        List actionMessages = (List) sessionMap.get(MessageStoreInterceptor.actionMessagesSessionKey);
        Map fieldErrors = (Map) sessionMap.get(MessageStoreInterceptor.fieldErrorsSessionKey);
View Full Code Here

        876).toString()));
    assertTrue("Returned true for invalid key", !hm.containsKey("KKDKDKD"));

    LinkedHashMap m = new LinkedHashMap();
    m.put(null, "test");
    assertTrue("Failed with null key", m.containsKey(null));
    assertTrue("Failed with missing key matching null hash", !m
        .containsKey(new Integer(0)));
  }

  /**
 
View Full Code Here

    assertTrue("Returned true for invalid key", !hm.containsKey("KKDKDKD"));

    LinkedHashMap m = new LinkedHashMap();
    m.put(null, "test");
    assertTrue("Failed with null key", m.containsKey(null));
    assertTrue("Failed with missing key matching null hash", !m
        .containsKey(new Integer(0)));
  }

  /**
   * @tests java.util.LinkedHashMap#containsValue(java.lang.Object)
View Full Code Here

        private Object[] getUniqueAttrValLineArray( LdifAttrValLine[] lines )
        {
            Map uniqueAttrMap = new LinkedHashMap();
            for ( int i = 0; i < lines.length; i++ )
            {
                if ( !uniqueAttrMap.containsKey( lines[i].getUnfoldedAttributeDescription() ) )
                {
                    uniqueAttrMap.put( lines[i].getUnfoldedAttributeDescription(), new ArrayList() );
                }
                ( ( List ) uniqueAttrMap.get( lines[i].getUnfoldedAttributeDescription() ) ).add( lines[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.