01: /*******************************************************************************
02: * Portions created by Sebastian Thomschke are copyright (c) 2005-2007 Sebastian
03: * Thomschke.
04: *
05: * All Rights Reserved. This program and the accompanying materials
06: * are made available under the terms of the Eclipse Public License v1.0
07: * which accompanies this distribution, and is available at
08: * http://www.eclipse.org/legal/epl-v10.html
09: *
10: * Contributors:
11: * Sebastian Thomschke - initial implementation.
12: *******************************************************************************/package net.sf.oval.collection;
13:
14: import java.util.List;
15: import java.util.Map;
16: import java.util.Set;
17:
18: /**
19: * @author Sebastian Thomschke
20: */
21: public interface CollectionFactory {
22: /**
23: * Instantiate an ArrayList like list object
24: */
25: <ValueType> List<ValueType> createList();
26:
27: /**
28: * Instantiate an ArrayList like list object
29: */
30: <ValueType> List<ValueType> createList(int initialCapacity);
31:
32: /**
33: * Instantiate a HashMap like map object
34: */
35: <KeyType, ValueType> Map<KeyType, ValueType> createMap();
36:
37: /**
38: * Instantiate a HashMap like map object
39: */
40: <KeyType, ValueType> Map<KeyType, ValueType> createMap(
41: int initialCapacity);
42:
43: /**
44: * Instantiate a HashSet like set object
45: */
46: <ValueType> Set<ValueType> createSet();
47:
48: /**
49: * Instantiate a HashSet like set object
50: */
51: <ValueType> Set<ValueType> createSet(int initialCapacity);
52: }
|