< prev index next >

src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/runtime/AssociationMap.java

Print this page

        

*** 1,7 **** /* ! * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this --- 1,7 ---- /* ! * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this
*** 64,74 **** private final Map<XmlNode,Entry<XmlNode>> byElement = new IdentityHashMap<XmlNode,Entry<XmlNode>>(); private final Map<Object,Entry<XmlNode>> byPeer = new IdentityHashMap<Object,Entry<XmlNode>>(); private final Set<XmlNode> usedNodes = new HashSet<XmlNode>(); ! /** Records the new element&lt;->inner peer association. */ public void addInner( XmlNode element, Object inner ) { Entry<XmlNode> e = byElement.get(element); if(e!=null) { if(e.inner!=null) byPeer.remove(e.inner); --- 64,74 ---- private final Map<XmlNode,Entry<XmlNode>> byElement = new IdentityHashMap<XmlNode,Entry<XmlNode>>(); private final Map<Object,Entry<XmlNode>> byPeer = new IdentityHashMap<Object,Entry<XmlNode>>(); private final Set<XmlNode> usedNodes = new HashSet<XmlNode>(); ! /** Records the new {@code element <->inner} peer association. */ public void addInner( XmlNode element, Object inner ) { Entry<XmlNode> e = byElement.get(element); if(e!=null) { if(e.inner!=null) byPeer.remove(e.inner);
*** 88,98 **** if(old.element!=null) byElement.remove(old.element); } } ! /** Records the new element&lt;->outer peer association. */ public void addOuter( XmlNode element, Object outer ) { Entry<XmlNode> e = byElement.get(element); if(e!=null) { if(e.outer!=null) byPeer.remove(e.outer); --- 88,98 ---- if(old.element!=null) byElement.remove(old.element); } } ! /** Records the new {@code element <-> outer} peer association. */ public void addOuter( XmlNode element, Object outer ) { Entry<XmlNode> e = byElement.get(element); if(e!=null) { if(e.outer!=null) byPeer.remove(e.outer);
< prev index next >