001// License: GPL. For details, see LICENSE file.
002package org.openstreetmap.josm.data.osm;
003
004import java.util.Comparator;
005
006/**
007 * Formats a name for a {@link OsmPrimitive}.
008 * @since 1990
009 */
010public interface NameFormatter {
011
012    /**
013     * Formats a name for a {@link Node}.
014     *
015     * @param node the node
016     * @return the name
017     */
018    String format(Node node);
019
020    /**
021     * Formats a name for a {@link Way}.
022     *
023     * @param way the way
024     * @return the name
025     */
026    String format(Way way);
027
028    /**
029     * Formats a name for a {@link Relation}.
030     *
031     * @param relation the relation
032     * @return the name
033     */
034    String format(Relation relation);
035
036    /**
037     * Formats a name for a {@link Changeset}.
038     *
039     * @param changeset the changeset
040     * @return the name
041     */
042    String format(Changeset changeset);
043
044    Comparator<Node> getNodeComparator();
045
046    Comparator<Way> getWayComparator();
047
048    Comparator<Relation> getRelationComparator();
049}