- Timestamp:
- 2016-11-29T01:52:46+01:00 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/osm/Storage.java
r11100 r11342 72 72 public class Storage<T> extends AbstractSet<T> { 73 73 74 /** 75 * Hash for {@link PrimitiveId}. 76 */ 74 77 public static class PrimitiveIdHash implements Hash<PrimitiveId, PrimitiveId> { 75 78 … … 111 114 } 112 115 116 /** 117 * Constructs a new {@code Storage} with given hash. 118 * @param ha hash 119 */ 113 120 public Storage(Hash<? super T, ? super T> ha) { 114 121 this(ha, DEFAULT_CAPACITY, false); 115 122 } 116 123 124 /** 125 * Constructs a new {@code Storage}. 126 * @param safeIterator If set to false, you must not modify the Storage while iterating over it. 127 * If set to true, you can safely modify, but the read-only iteration will happen on a copy of the unmodified Storage. 128 * This is similar to CopyOnWriteArrayList. 129 */ 117 130 public Storage(boolean safeIterator) { 118 131 this(Storage.<T>defaultHash(), DEFAULT_CAPACITY, safeIterator); 119 132 } 120 133 134 /** 135 * Constructs a new {@code Storage} with given capacity. 136 * @param capacity capacity 137 * @param safeIterator If set to false, you must not modify the Storage while iterating over it. 138 * If set to true, you can safely modify, but the read-only iteration will happen on a copy of the unmodified Storage. 139 * This is similar to CopyOnWriteArrayList. 140 */ 121 141 public Storage(int capacity, boolean safeIterator) { 122 142 this(Storage.<T>defaultHash(), capacity, safeIterator); 123 143 } 124 144 145 /** 146 * Constructs a new {@code Storage} with given hash. 147 * @param ha hash 148 * @param safeIterator If set to false, you must not modify the Storage while iterating over it. 149 * If set to true, you can safely modify, but the read-only iteration will happen on a copy of the unmodified Storage. 150 * This is similar to CopyOnWriteArrayList. 151 */ 125 152 public Storage(Hash<? super T, ? super T> ha, boolean safeIterator) { 126 153 this(ha, DEFAULT_CAPACITY, safeIterator); 127 154 } 128 155 156 /** 157 * Constructs a new {@code Storage} with given hash and capacity. 158 * @param ha hash 159 * @param capacity capacity 160 */ 129 161 public Storage(Hash<? super T, ? super T> ha, int capacity) { 130 162 this(ha, capacity, false); … … 132 164 133 165 /** 134 * constructor166 * Constructs a new {@code Storage} with given hash and capacity. 135 167 * @param ha hash 136 168 * @param capacity capacity 137 * @param safeIterator If set to false, you must not modify the Storage 138 * while iterating over it. If set to true, you can safely 139 * modify, but the read-only iteration will happen on a copy 140 * of the unmodified Storage. 141 * This is similar to CopyOnWriteArrayList. 169 * @param safeIterator If set to false, you must not modify the Storage while iterating over it. 170 * If set to true, you can safely modify, but the read-only iteration will happen on a copy of the unmodified Storage. 171 * This is similar to CopyOnWriteArrayList. 142 172 */ 143 173 public Storage(Hash<? super T, ? super T> ha, int capacity, boolean safeIterator) {
Note:
See TracChangeset
for help on using the changeset viewer.