Last change
on this file since 2667 was 1169, checked in by stoecker, 15 years ago |
removed usage of tab stops
|
-
Property svn:eol-style
set to
native
|
File size:
790 bytes
|
Line | |
---|
1 | // License: GPL. Copyright 2007 by Gabriel Ebner
|
---|
2 | package org.openstreetmap.josm.data.osm;
|
---|
3 |
|
---|
4 | /**
|
---|
5 | * A segment consisting of 2 consecutive nodes out of a way.
|
---|
6 | */
|
---|
7 | public final class WaySegment {
|
---|
8 | /**
|
---|
9 | * The way.
|
---|
10 | */
|
---|
11 | public Way way;
|
---|
12 |
|
---|
13 | /**
|
---|
14 | * The index of one of the 2 nodes in the way. The other node has the
|
---|
15 | * index <code>lowerIndex + 1</code>.
|
---|
16 | */
|
---|
17 | public int lowerIndex;
|
---|
18 |
|
---|
19 | public WaySegment(Way w, int i) {
|
---|
20 | way = w;
|
---|
21 | lowerIndex = i;
|
---|
22 | }
|
---|
23 |
|
---|
24 | @Override public boolean equals(Object o) {
|
---|
25 | return o != null && o instanceof WaySegment
|
---|
26 | && ((WaySegment) o).way == way
|
---|
27 | && ((WaySegment) o).lowerIndex == lowerIndex;
|
---|
28 | }
|
---|
29 |
|
---|
30 | @Override public int hashCode() {
|
---|
31 | return way.hashCode() ^ lowerIndex;
|
---|
32 | }
|
---|
33 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.