Last change
on this file since 9 was 9, checked in by imi, 19 years ago |
- added support for DataReaders
- added a nice status line and a tooltip when holding middle mouse button
|
File size:
1.1 KB
|
Line | |
---|
1 | package org.openstreetmap.josm.data.osm;
|
---|
2 |
|
---|
3 | import java.util.Collection;
|
---|
4 | import java.util.Collections;
|
---|
5 | import java.util.LinkedList;
|
---|
6 |
|
---|
7 | import org.openstreetmap.josm.data.GeoPoint;
|
---|
8 | import org.openstreetmap.josm.data.osm.visitor.Visitor;
|
---|
9 |
|
---|
10 |
|
---|
11 | /**
|
---|
12 | * One node data, consisting of one world coordinate waypoint.
|
---|
13 | *
|
---|
14 | * @author imi
|
---|
15 | */
|
---|
16 | public class Node extends OsmPrimitive {
|
---|
17 |
|
---|
18 | /**
|
---|
19 | * The coordinates of this node.
|
---|
20 | */
|
---|
21 | public GeoPoint coor;
|
---|
22 |
|
---|
23 | /**
|
---|
24 | * The list of line segments, this node is part of.
|
---|
25 | */
|
---|
26 | transient Collection<LineSegment> parentSegment = new LinkedList<LineSegment>();
|
---|
27 |
|
---|
28 | /**
|
---|
29 | * Returns a read-only list of all segments this node is in.
|
---|
30 | * @return A list of all segments. Readonly.
|
---|
31 | */
|
---|
32 | public Collection<LineSegment> getParentSegments() {
|
---|
33 | return Collections.unmodifiableCollection(parentSegment);
|
---|
34 | }
|
---|
35 |
|
---|
36 | /**
|
---|
37 | * Return a list only this added.
|
---|
38 | */
|
---|
39 | @Override
|
---|
40 | public Collection<Node> getAllNodes() {
|
---|
41 | LinkedList<Node> nodes = new LinkedList<Node>();
|
---|
42 | nodes.add(this);
|
---|
43 | return nodes;
|
---|
44 | }
|
---|
45 |
|
---|
46 | @Override
|
---|
47 | public void visit(Visitor visitor) {
|
---|
48 | visitor.visit(this);
|
---|
49 | }
|
---|
50 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.