001// License: GPL. For details, see LICENSE file. 002package org.openstreetmap.josm.data.osm; 003 004/** 005 * IWay captures the common functions of {@link Way} and {@link WayData}. 006 * @since 4098 007 */ 008public interface IWay extends IPrimitive { 009 010 /** 011 * Replies the number of nodes in this way. 012 * 013 * @return the number of nodes in this way. 014 */ 015 int getNodesCount(); 016 017 /** 018 * Returns id of the node at given index. 019 * @param idx node index 020 * @return id of the node at given index 021 */ 022 long getNodeId(int idx); 023 024 /** 025 * Determines if this way is closed. 026 * @return {@code true} if this way is closed, {@code false} otherwise 027 */ 028 boolean isClosed(); 029}