Changeset 6889 in josm for trunk/src/org/openstreetmap/josm/data
- Timestamp:
- 2014-02-27T01:41:49+01:00 (11 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/data
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/Preferences.java
r6851 r6889 154 154 * @param <T> The setting type 155 155 */ 156 abstract publicstatic class AbstractSetting<T> implements Setting<T> {156 public abstract static class AbstractSetting<T> implements Setting<T> { 157 157 protected final T value; 158 158 /** … … 1307 1307 * The default plugin site 1308 1308 */ 1309 private final staticString[] DEFAULT_PLUGIN_SITE = {Main.JOSM_WEBSITE+"/plugin%<?plugins=>"};1309 private static final String[] DEFAULT_PLUGIN_SITE = {Main.JOSM_WEBSITE+"/plugin%<?plugins=>"}; 1310 1310 1311 1311 /** -
trunk/src/org/openstreetmap/josm/data/Version.java
r6822 r6889 23 23 public class Version { 24 24 /** constant to indicate that the current build isn't assigned a JOSM version number */ 25 static public final int JOSM_UNKNOWN_VERSION = 0;25 public static final int JOSM_UNKNOWN_VERSION = 0; 26 26 27 27 /** the unique instance */ … … 34 34 * @return the content of the resource file; null, if an error occurred 35 35 */ 36 static public String loadResourceFile(URL resource) {36 public static String loadResourceFile(URL resource) { 37 37 if (resource == null) return null; 38 38 String s = null; … … 60 60 * @return the unique instance of the version information 61 61 */ 62 63 static public Version getInstance() { 62 public static Version getInstance() { 64 63 if (instance == null) { 65 64 instance = new Version(); -
trunk/src/org/openstreetmap/josm/data/osm/AbstractPrimitive.java
r6830 r6889 675 675 * What to do, when the tags have changed by one of the tag-changing methods. 676 676 */ 677 abstractprotected void keysChangedImpl(Map<String, String> originalKeys);677 protected abstract void keysChangedImpl(Map<String, String> originalKeys); 678 678 679 679 /** -
trunk/src/org/openstreetmap/josm/data/osm/ChangesetCache.java
r6362 r6889 34 34 public final class ChangesetCache implements PreferenceChangedListener{ 35 35 /** the unique instance */ 36 staticprivate final ChangesetCache instance = new ChangesetCache();36 private static final ChangesetCache instance = new ChangesetCache(); 37 37 38 38 /** -
trunk/src/org/openstreetmap/josm/data/osm/ChangesetDataSet.java
r6084 r6889 28 28 } 29 29 30 finalprivate Map<PrimitiveId, HistoryOsmPrimitive> primitives = new HashMap<PrimitiveId, HistoryOsmPrimitive>();31 finalprivate Map<PrimitiveId, ChangesetModificationType> modificationTypes = new HashMap<PrimitiveId, ChangesetModificationType>();30 private final Map<PrimitiveId, HistoryOsmPrimitive> primitives = new HashMap<PrimitiveId, HistoryOsmPrimitive>(); 31 private final Map<PrimitiveId, ChangesetModificationType> modificationTypes = new HashMap<PrimitiveId, ChangesetModificationType>(); 32 32 33 33 /** -
trunk/src/org/openstreetmap/josm/data/osm/OsmPrimitive.java
r6830 r6889 40 40 * @author imi 41 41 */ 42 abstract publicclass OsmPrimitive extends AbstractPrimitive implements Comparable<OsmPrimitive>, TemplateEngineDataProvider {42 public abstract class OsmPrimitive extends AbstractPrimitive implements Comparable<OsmPrimitive>, TemplateEngineDataProvider { 43 43 private static final String SPECIAL_VALUE_ID = "id"; 44 44 private static final String SPECIAL_VALUE_LOCAL_NAME = "localname"; … … 119 119 * @return the sub-list of OSM primitives of type <code>type</code> 120 120 */ 121 static public <T extends OsmPrimitive> List<T> getFilteredList(Collection<OsmPrimitive> list, Class<T> type) {121 public static <T extends OsmPrimitive> List<T> getFilteredList(Collection<OsmPrimitive> list, Class<T> type) { 122 122 if (list == null) return Collections.emptyList(); 123 123 List<T> ret = new LinkedList<T>(); … … 141 141 * @return the sub-set of OSM primitives of type <code>type</code> 142 142 */ 143 static public <T extends OsmPrimitive> Set<T> getFilteredSet(Collection<OsmPrimitive> set, Class<T> type) {143 public static <T extends OsmPrimitive> Set<T> getFilteredSet(Collection<OsmPrimitive> set, Class<T> type) { 144 144 Set<T> ret = new LinkedHashSet<T>(); 145 145 if (set != null) { … … 160 160 * empty set if primitives is null or if there are no referring primitives 161 161 */ 162 static public Set<OsmPrimitive> getReferrer(Collection<? extends OsmPrimitive> primitives) {162 public static Set<OsmPrimitive> getReferrer(Collection<? extends OsmPrimitive> primitives) { 163 163 HashSet<OsmPrimitive> ret = new HashSet<OsmPrimitive>(); 164 164 if (primitives == null || primitives.isEmpty()) return ret; … … 1077 1077 * @param visitor The visitor from which the visit() function must be called. 1078 1078 */ 1079 abstract publicvoid accept(Visitor visitor);1079 public abstract void accept(Visitor visitor); 1080 1080 1081 1081 /** -
trunk/src/org/openstreetmap/josm/data/osm/OsmPrimitiveComparator.java
r6380 r6889 10 10 /** Comparator, comparing by type and objects display names */ 11 11 public class OsmPrimitiveComparator implements Comparator<OsmPrimitive> { 12 finalprivate Map<OsmPrimitive, String> cache= new HashMap<OsmPrimitive, String>();13 finalprivate DefaultNameFormatter df = DefaultNameFormatter.getInstance();12 private final Map<OsmPrimitive, String> cache= new HashMap<OsmPrimitive, String>(); 13 private final DefaultNameFormatter df = DefaultNameFormatter.getInstance(); 14 14 public boolean relationsFirst = false; 15 15 … … 26 26 String an = cachedName(a); 27 27 String bn = cachedName(b); 28 // make sure display names starting with digits are the end of the 29 // list 28 // make sure display names starting with digits are the end of the list 30 29 if (Character.isDigit(an.charAt(0)) && Character.isDigit(bn.charAt(0))) 31 30 return an.compareTo(bn); -
trunk/src/org/openstreetmap/josm/data/osm/OsmPrimitiveType.java
r4387 r6889 19 19 MULTIPOLYGON (marktr(/* ICON(data/) */"multipolygon"), null, RelationData.class); 20 20 21 private final staticCollection<OsmPrimitiveType> DATA_VALUES = Arrays.asList(NODE, WAY, RELATION);21 private static final Collection<OsmPrimitiveType> DATA_VALUES = Arrays.asList(NODE, WAY, RELATION); 22 22 23 23 private final String apiTypeName; -
trunk/src/org/openstreetmap/josm/data/osm/PrimitiveData.java
r5589 r6889 17 17 public abstract class PrimitiveData extends AbstractPrimitive { 18 18 19 /** 20 * Constructs a new {@code PrimitiveData}. 21 */ 19 22 public PrimitiveData() { 20 23 id = OsmPrimitive.generateUniqueId(); … … 51 54 52 55 @SuppressWarnings("unchecked") 53 static public <T extends PrimitiveData> List<T> getFilteredList(Collection<T> list, OsmPrimitiveType type) {56 public static <T extends PrimitiveData> List<T> getFilteredList(Collection<T> list, OsmPrimitiveType type) { 54 57 List<T> ret = new ArrayList<T>(); 55 58 for(PrimitiveData p: list) { -
trunk/src/org/openstreetmap/josm/data/osm/RelationToChildReference.java
r5266 r6889 14 14 * @return a set of all {@link RelationToChildReference}s for a given child primitive 15 15 */ 16 static public Set<RelationToChildReference> getRelationToChildReferences(OsmPrimitive child) {16 public static Set<RelationToChildReference> getRelationToChildReferences(OsmPrimitive child) { 17 17 Set<Relation> parents = OsmPrimitive.getFilteredSet(child.getReferrers(), Relation.class); 18 18 Set<RelationToChildReference> references = new HashSet<RelationToChildReference>(); … … 34 34 * primitives 35 35 */ 36 static public Set<RelationToChildReference> getRelationToChildReferences(Collection<? extends OsmPrimitive> children) {36 public static Set<RelationToChildReference> getRelationToChildReferences(Collection<? extends OsmPrimitive> children) { 37 37 Set<RelationToChildReference> references = new HashSet<RelationToChildReference>(); 38 38 for (OsmPrimitive child: children) { -
trunk/src/org/openstreetmap/josm/data/osm/User.java
r6822 r6889 25 25 public final class User { 26 26 27 staticprivate AtomicLong uidCounter = new AtomicLong();27 private static AtomicLong uidCounter = new AtomicLong(); 28 28 29 29 /** … … 31 31 */ 32 32 private static Map<Long,User> userMap = new HashMap<Long,User>(); 33 private final staticUser anonymous = createLocalUser(tr("<anonymous>"));33 private static final User anonymous = createLocalUser(tr("<anonymous>")); 34 34 35 35 private static long getNextLocalUid() {
Note:
See TracChangeset
for help on using the changeset viewer.