org.openstreetmap.osmosis.core.domain.v0_6
Class WayNode

java.lang.Object
  extended by org.openstreetmap.osmosis.core.domain.v0_6.WayNode
All Implemented Interfaces:
java.lang.Comparable<WayNode>, Storeable

public class WayNode
extends java.lang.Object
implements java.lang.Comparable<WayNode>, Storeable

A data class representing a reference to an OSM node.

Author:
Brett Henderson

Constructor Summary
WayNode(long nodeId)
          Creates a new instance.
WayNode(StoreReader sr, StoreClassRegister scr)
          Creates a new instance.
 
Method Summary
 int compareTo(WayNode wayNode)
          Compares this way node to the specified way node.
 long getNodeId()
           
 void store(StoreWriter sw, StoreClassRegister scr)
          Stores all state to the specified store writer.
 java.lang.String toString()
          $.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

WayNode

public WayNode(long nodeId)
Creates a new instance.

Parameters:
nodeId - The unique identifier of the node being referred to.

WayNode

public WayNode(StoreReader sr,
               StoreClassRegister scr)
Creates a new instance.

Parameters:
sr - The store to read state from.
scr - Maintains the mapping between classes and their identifiers within the store.
Method Detail

store

public void store(StoreWriter sw,
                  StoreClassRegister scr)
Stores all state to the specified store writer.

Specified by:
store in interface Storeable
Parameters:
sw - The writer that persists data to an underlying store.
scr - Maintains the mapping between classes and their identifiers within the store.

compareTo

public int compareTo(WayNode wayNode)
Compares this way node to the specified way node. The way node comparison is based on a comparison of nodeId.

Specified by:
compareTo in interface java.lang.Comparable<WayNode>
Parameters:
wayNode - The way node to compare to.
Returns:
0 if equal, < 0 if considered "smaller", and > 0 if considered "bigger".

getNodeId

public long getNodeId()
Returns:
The nodeId.

toString

public java.lang.String toString()
$.

Overrides:
toString in class java.lang.Object