< prev index next >
src/jdk.xml.bind/share/classes/com/sun/xml/internal/xsom/impl/SchemaImpl.java
Print this page
@@ -1,7 +1,7 @@
/*
- * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, 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
@@ -49,10 +49,11 @@
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.HashMap;
import java.util.Iterator;
+import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
public class SchemaImpl implements XSSchema
{
@@ -123,11 +124,11 @@
}
public Iterator<XSAttributeDecl> iterateAttributeDecls() {
return atts.values().iterator();
}
- private final Map<String,XSElementDecl> elems = new HashMap<String,XSElementDecl>();
+ private final Map<String, XSElementDecl> elems = new LinkedHashMap<String, XSElementDecl>();
private final Map<String,XSElementDecl> elemsView = Collections.unmodifiableMap(elems);
public void addElementDecl(XSElementDecl newDecl) {
elems.put(newDecl.getName(), newDecl);
}
public Map<String,XSElementDecl> getElementDecls() {
@@ -202,11 +203,11 @@
public XSIdentityConstraint getIdentityConstraint(String localName) {
return idConstraints.get(localName);
}
- private final Map<String,XSType> allTypes = new HashMap<String,XSType>();
+ private final Map<String, XSType> allTypes = new LinkedHashMap<String, XSType>();
private final Map<String,XSType> allTypesView = Collections.unmodifiableMap(allTypes);
private final Map<String,XSSimpleType> simpleTypes = new HashMap<String,XSSimpleType>();
private final Map<String,XSSimpleType> simpleTypesView = Collections.unmodifiableMap(simpleTypes);
public void addSimpleType(XSSimpleType newDecl, boolean overwrite) {
< prev index next >