Changeset 8470 in josm for trunk/src/org/openstreetmap/josm/data/osm/OsmPrimitive.java
- Timestamp:
- 2015-06-06T04:32:00+02:00 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/osm/OsmPrimitive.java
r8444 r8470 45 45 private static final String SPECIAL_VALUE_LOCAL_NAME = "localname"; 46 46 47 48 47 /** 49 48 * An object can be disabled by the filter mechanism. … … 115 114 * If <code>list</code> is null, replies an empty list. 116 115 * 117 * @param <T> 116 * @param <T> type of data (must be one of the {@link OsmPrimitive} types 118 117 * @param list the original list 119 118 * @param type the type to filter for 120 119 * @return the sub-list of OSM primitives of type <code>type</code> 121 120 */ 122 public static <T extends OsmPrimitive> 121 public static <T extends OsmPrimitive> List<T> getFilteredList(Collection<OsmPrimitive> list, Class<T> type) { 123 122 if (list == null) return Collections.emptyList(); 124 123 List<T> ret = new LinkedList<>(); … … 249 248 * 250 249 * @param id the id 251 * @param allowNegativeId 250 * @param allowNegativeId {@code true} to allow negative id 252 251 * @throws IllegalArgumentException if id < 0 and allowNegativeId is false 253 252 */ … … 278 277 * If id is not > 0 version is ignored and set to 0. 279 278 * 280 * @param id 281 * @param version 282 * @param allowNegativeId 279 * @param id the id 280 * @param version the version (positive integer) 281 * @param allowNegativeId {@code true} to allow negative id 283 282 * @throws IllegalArgumentException if id < 0 and allowNegativeId is false 284 283 */ … … 288 287 setIncomplete(id > 0 && version == 0); 289 288 } 290 291 289 292 290 /*---------- … … 313 311 /** 314 312 * This method should never ever by called from somewhere else than Dataset.addPrimitive or removePrimitive methods 315 * @param dataSet 313 * @param dataSet the parent dataset 316 314 */ 317 315 void setDataset(DataSet dataSet) { … … 1175 1173 1176 1174 /** 1177 * Replies true if this primitive and other are equal with respect to their 1178 * semantic attributes. 1175 * Replies true if this primitive and other are equal with respect to their semantic attributes. 1179 1176 * <ol> 1180 1177 * <li>equal id</li> … … 1182 1179 * <li>both have the same tags</li> 1183 1180 * </ol> 1184 * @param other 1185 * @return true if this primitive and other are equal with respect to their 1186 * semantic attributes. 1181 * @param other other primitive to compare 1182 * @return true if this primitive and other are equal with respect to their semantic attributes. 1187 1183 */ 1188 1184 public boolean hasEqualSemanticAttributes(OsmPrimitive other) { … … 1197 1193 1198 1194 /** 1199 * Replies true if this primitive and other are equal with respect to their 1200 * technical attributes.The attributes:1195 * Replies true if this primitive and other are equal with respect to their technical attributes. 1196 * The attributes: 1201 1197 * <ol> 1202 1198 * <li>deleted</li> … … 1209 1205 * have to be equal 1210 1206 * @param other the other primitive 1211 * @return true if this primitive and other are equal with respect to their 1212 * technical attributes 1207 * @return true if this primitive and other are equal with respect to their technical attributes 1213 1208 */ 1214 1209 public boolean hasEqualTechnicalAttributes(OsmPrimitive other) { 1215 1210 if (other == null) return false; 1216 1211 1217 return 1218 isDeleted() == other.isDeleted() 1212 return isDeleted() == other.isDeleted() 1219 1213 && isModified() == other.isModified() 1220 1214 && timestamp == other.timestamp
Note:
See TracChangeset
for help on using the changeset viewer.