1 | public class OrderedMapType extends MapType {↵ | | 1 | public class OrderedSetType extends SetType {↵
|
|
2 | /**↵ | | 2 | /**↵
|
3 | * Constructs a map type capable of creating ordered maps of the given↵ | | 3 | * Constructs a set type capable of creating ordered sets of the given↵
|
4 | * role.↵ | | 4 | * role.↵
|
5 | *↵ | | 5 | *↵
|
6 | * @param role The collection role name.↵ | | 6 | * @param role The collection role name.↵
|
7 | * @param propertyRef The property ref name.↵ | | 7 | * @param propertyRef The property ref name.↵
|
8 | * @param isEmbeddedInXML Is this collection to embed itself in xml↵ | | 8 | * @param isEmbeddedInXML Is this collection to embed itself in xml↵
|
9 | */↵ | | 9 | */↵
|
10 | public OrderedMapType(String role, String propertyRef, boolean isEmbeddedInXML) {↵ | | 10 | public OrderedSetType(String role, String propertyRef, boolean isEmbeddedInXML) {↵
|
11 | super( role, propertyRef, isEmbeddedInXML );↵ | | 11 | super( role, propertyRef, isEmbeddedInXML );↵
|
12 | }↵ | | 12 | }↵
|
|
13 | /**↵ | | 13 | /**↵
|
14 | * {@inheritDoc}↵ | | 14 | * {@inheritDoc}↵
|
15 | */↵ | | 15 | */↵
|
16 | public Object instantiate(int anticipatedSize) {↵ | | 16 | public Object instantiate(int anticipatedSize) {↵
|
17 | return anticipatedSize > 0↵ | | 17 | return anticipatedSize > 0↵
|
18 | ? new LinkedHashMap( anticipatedSize )↵ | | 18 | ? new LinkedHashSet( anticipatedSize )↵
|
19 | : new LinkedHashMap() | | 19 | : new LinkedHashSet()
|