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: import javolution.util.FastMap;
19: import javolution.util.FastSet;
20: import javolution.util.FastTable;
21:
22: /**
23: * @author Sebastian Thomschke
24: */
25: public class CollectionFactoryJavalutionImpl implements
26: CollectionFactory {
27: public <ItemType> List<ItemType> createList() {
28: return new FastTable<ItemType>();
29: }
30:
31: public <ItemType> List<ItemType> createList(
32: final int initialCapacity) {
33: return new FastTable<ItemType>(initialCapacity);
34: }
35:
36: public <KeyType, ValueType> Map<KeyType, ValueType> createMap() {
37: return new FastMap<KeyType, ValueType>();
38: }
39:
40: public <KeyType, ValueType> Map<KeyType, ValueType> createMap(
41: final int initialCapacity) {
42: return new FastMap<KeyType, ValueType>(initialCapacity);
43: }
44:
45: public <ItemType> Set<ItemType> createSet() {
46: return new FastSet<ItemType>();
47: }
48:
49: public <ItemType> Set<ItemType> createSet(final int initialCapacity) {
50: return new FastSet<ItemType>(initialCapacity);
51: }
52: }
|