source: josm/trunk/src/org/openstreetmap/josm/data/osm/NameFormatter.java@ 13187

Last change on this file since 13187 was 12189, checked in by michael2402, 7 years ago

See #14794: Javadoc for data.osm package

  • Property svn:eol-style set to native
File size: 1.4 KB
Line 
1// License: GPL. For details, see LICENSE file.
2package org.openstreetmap.josm.data.osm;
3
4import java.util.Comparator;
5
6/**
7 * Formats a name for a {@link OsmPrimitive}.
8 * @since 1990
9 */
10public interface NameFormatter {
11
12 /**
13 * Formats a name for a {@link Node}.
14 *
15 * @param node the node
16 * @return the name
17 */
18 String format(Node node);
19
20 /**
21 * Formats a name for a {@link Way}.
22 *
23 * @param way the way
24 * @return the name
25 */
26 String format(Way way);
27
28 /**
29 * Formats a name for a {@link Relation}.
30 *
31 * @param relation the relation
32 * @return the name
33 */
34 String format(Relation relation);
35
36 /**
37 * Formats a name for a {@link Changeset}.
38 *
39 * @param changeset the changeset
40 * @return the name
41 */
42 String format(Changeset changeset);
43
44 /**
45 * Gets a comparator that sorts the nodes by the string that this formatter would create for them
46 * @return That comparator
47 */
48 Comparator<Node> getNodeComparator();
49
50 /**
51 * Gets a comparator that sorts the ways by the string that this formatter would create for them
52 * @return That comparator
53 */
54 Comparator<Way> getWayComparator();
55
56 /**
57 * Gets a comparator that sorts the relations by the string that this formatter would create for them
58 * @return That comparator
59 */
60 Comparator<Relation> getRelationComparator();
61}
Note: See TracBrowser for help on using the repository browser.