Changeset 3503 in josm for trunk/src/org/openstreetmap/josm/data
- Timestamp:
- 2010-08-31T12:39:49+02:00 (14 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/data/osm
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/osm/DataSet.java
r3479 r3503 69 69 } 70 70 71 private Storage<OsmPrimitive> allPrimitives = new Storage<OsmPrimitive>(new IdHash(), 16,true);71 private Storage<OsmPrimitive> allPrimitives = new Storage<OsmPrimitive>(new IdHash(), true); 72 72 private Map<PrimitiveId, OsmPrimitive> primitivesMap = allPrimitives.foreignKey(new IdHash()); 73 73 private CopyOnWriteArrayList<DataSetListener> listeners = new CopyOnWriteArrayList<DataSetListener>(); -
trunk/src/org/openstreetmap/josm/data/osm/Storage.java
r3453 r3503 93 93 private transient volatile int modCount = 0; 94 94 private float loadFactor = 0.6f; 95 private static final int DEFAULT_CAPACITY = 16; 95 96 private final boolean safeIterator; 96 97 private boolean arrayCopyNecessary; 97 98 98 99 public Storage() { 99 this(Storage.<T>defaultHash()); 100 this(Storage.<T>defaultHash(), DEFAULT_CAPACITY, false); 100 101 } 101 102 … … 105 106 106 107 public Storage(Hash<? super T,? super T> ha) { 107 this(ha, 16, false); 108 } 109 108 this(ha, DEFAULT_CAPACITY, false); 109 } 110 111 public Storage(boolean safeIterator) { 112 this(Storage.<T>defaultHash(), DEFAULT_CAPACITY, safeIterator); 113 } 114 115 public Storage(int capacity, boolean safeIterator) { 116 this(Storage.<T>defaultHash(), capacity, safeIterator); 117 } 118 119 public Storage(Hash<? super T,? super T> ha, boolean safeIterator) { 120 this(ha, DEFAULT_CAPACITY, safeIterator); 121 } 122 123 public Storage(Hash<? super T, ? super T> ha, int capacity) { 124 this(ha, capacity, false); 125 } 126 /** 127 * constructor 128 * @param ha 129 * @param capacity 130 * @param safeIterator If set to false, you must not modify the Storage 131 * while iterating over it. If set to true, you can savely 132 * modify, but the read-only iteration will happen on a copy 133 * of the unmodified Storage. 134 */ 110 135 public Storage(Hash<? super T, ? super T> ha, int capacity, boolean safeIterator) { 111 136 this.hash = ha;
Note:
See TracChangeset
for help on using the changeset viewer.