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

Last change on this file since 13665 was 13564, checked in by Don-vip, 6 years ago

introduce PrimitiveRenderer to replace OsmPrimitivRenderer (now deprecated). Change NameFormatter API to support IPrimitive instead of OsmPrimitive. Enhances interfaces in consequence.

  • Property svn:eol-style set to native
File size: 1.6 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 an {@link IPrimitive}.
8 * @since 1990
9 */
10public interface NameFormatter {
11
12 /**
13 * Formats a name for a {@link INode}.
14 *
15 * @param node the node
16 * @return the name
17 * @since 13564 (signature)
18 */
19 String format(INode node);
20
21 /**
22 * Formats a name for a {@link IWay}.
23 *
24 * @param way the way
25 * @return the name
26 * @since 13564 (signature)
27 */
28 String format(IWay way);
29
30 /**
31 * Formats a name for a {@link IRelation}.
32 *
33 * @param relation the relation
34 * @return the name
35 * @since 13564 (signature)
36 */
37 String format(IRelation relation);
38
39 /**
40 * Formats a name for a {@link Changeset}.
41 *
42 * @param changeset the changeset
43 * @return the name
44 */
45 String format(Changeset changeset);
46
47 /**
48 * Gets a comparator that sorts the nodes by the string that this formatter would create for them
49 * @return That comparator
50 * @since 13564 (signature)
51 */
52 Comparator<INode> getNodeComparator();
53
54 /**
55 * Gets a comparator that sorts the ways by the string that this formatter would create for them
56 * @return That comparator
57 * @since 13564 (signature)
58 */
59 Comparator<IWay> getWayComparator();
60
61 /**
62 * Gets a comparator that sorts the relations by the string that this formatter would create for them
63 * @return That comparator
64 * @since 13564 (signature)
65 */
66 Comparator<IRelation> getRelationComparator();
67}
Note: See TracBrowser for help on using the repository browser.