Examples of containsKey()


Examples of java.util.Collection.containsKey()

                    if (leftResult == null)
                    {
                        return null;
                    }
                    Map coll = (Map) rightResult;
                    if (coll.containsKey(leftResult))
                    {
                        return false;
                    }
                    hasNonNullRow = true;
                }
View Full Code Here

Examples of java.util.EnumMap.containsKey()

     * @tests java.util.EnumMap#containsKey(Object)
     */
    @SuppressWarnings( { "unchecked", "boxing" })
    public void test_containsKeyLjava_lang_Object() {
        EnumMap enumSizeMap = new EnumMap(Size.class);
        assertFalse("Returned true for uncontained key", enumSizeMap //$NON-NLS-1$
                .containsKey(Size.Small));
        enumSizeMap.put(Size.Small, 1);
        assertTrue("Returned false for contained key", enumSizeMap //$NON-NLS-1$
                .containsKey(Size.Small));

View Full Code Here

Examples of java.util.HashMap.containsKey()

    HttpSession session = ((HttpServletRequest)(pageContext.getRequest())).getSession();

        ModuleFieldRightMatrix mfrmx = ((UserObject)session.getAttribute("userobject")).getUserPref().getModuleAuthorizationMatrix();
    HashMap hm = mfrmx.getFieldRights(getModulename());

    if (hm != null && hm.containsKey(getFieldname()))
    {
      fieldRight =  ((Integer)hm.get(getFieldname())).intValue();
    }

View Full Code Here

Examples of java.util.Hashtable.containsKey()

        Enumeration enumKeyRecord = record_compositeName.keys();
        while(enumKeyRecord.hasMoreElements()) {
          Record recor =(Record)enumKeyRecord.nextElement();
          CompositeName cn =(CompositeName)((CompositeName)(record_compositeName.get(recor))).clone();
          cn.add(recor.getName());
          if(composite_context.containsKey(cn)){
            NamingContext nc  =(NamingContext)composite_context.get(cn);
            ((ContextRecord)recor).setId(nc.getId());
          }       
        }
        Enumeration enumContext = composite_context.elements();
View Full Code Here

Examples of java.util.IdentityHashMap.containsKey()

    }
   
    private void cascadeMerge(Object source, Object destination) {
        // We are traversing the source object graph, and we'll have to put in an identity map the source object.
        IdentityHashMap localIdentityMap = (IdentityHashMap) DefaultIdMerger.localIdentityMap.get();
        if (! localIdentityMap.containsKey(source)) {
            localIdentityMap.put(source, new Integer(1));
            this.doCascadeMerge(source, destination);
        }
    }
   
View Full Code Here

Examples of java.util.LinkedHashMap.containsKey()

        public void manage(EjbRelationTag relTag, JavaMethod method, JavaClass sourceBean) {
            LinkedHashMap mapFor = getMapFor(relTag.getName_());
            RelationEntryHolder entryHolder;

            if (mapFor.containsKey(method)) {
                entryHolder = (RelationEntryHolder) mapFor.get(method);

                if (log.isDebugEnabled()) {
                    log.debug("Existing relation entry pair for relation named '" + relTag.getName_() + "' found at " +
                        tagToString(relTag));
View Full Code Here

Examples of java.util.Map.containsKey()

  public void testSimpleReverse() {
    A source = new A();
    source.setB(new B());
    Map dest = mapper.map(source, HashMap.class, NULL);
    assertNotNull(dest);
    assertTrue(dest.containsKey("key"));
    assertNotNull(dest.get("key"));
  }

  @Test
  public void testNull() {
View Full Code Here

Examples of java.util.NavigableMap.containsKey()

    }

    public void test_contains_null() throws Exception {
        NavigableMap map = tm.subMap(objArray[100].toString(), true,
                objArray[100].toString(), false);
        assertFalse(map.containsKey(objArray[100].toString()));
        assertFalse(map.containsKey(objArray[10].toString()));
        assertFalse(map.containsKey(objArray[101].toString()));
        assertFalse(map.containsKey(objArray[102].toString()));
        assertFalse(map.containsKey(objArray[1].toString()));
        map = map.descendingMap();
View Full Code Here

Examples of java.util.Properties.containsKey()

    public void testNillableNode() {
        MappingDocument doc = FakeXMLMetadata.docWithExcluded();
        MappingElement root = (MappingElement)doc.getRootNode();
       
        Properties names = root.getNamespacesAsProperties();
        assertFalse(names.containsKey("xsi"));//$NON-NLS-1$
       
        HandleNillableVisitor.execute(doc);
       
        names = root.getNamespacesAsProperties();
        assertTrue(names.containsKey("xsi"));//$NON-NLS-1$
View Full Code Here

Examples of java.util.PropertyResourceBundle.containsKey()

      if ( rb != null ) {
        // this is the 4.8 style - name and description
        // First try file desc. If no file desc, try for a directory desc, else try fallback
        comment =
            rb.containsKey( DESC_PROPERTY_NAME ) ? rb.getString( DESC_PROPERTY_NAME ) : rb
                .containsKey( FILE_DESCRIPTION ) ? rb.getString( FILE_DESCRIPTION ) : rb
                .containsKey( DIRECTORY_DESCRIPTION ) ? rb.getString( DIRECTORY_DESCRIPTION ) : comment;

        // First try name. If no name, try title. If no title, try for a directory name, else use filename.
        fileTitle =
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.