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

java.lang.Object
  extended by org.openstreetmap.osmosis.core.domain.v0_6.OsmUser
All Implemented Interfaces:
Storeable

public class OsmUser
extends java.lang.Object
implements Storeable

A value class representing a single OSM user, comprised of user name and id. This class is immutable, and the static factories are thread-safe.

Author:
Karl Newman, Brett Henderson

Field Summary
static OsmUser NONE
          The user instance representing no user available or no user applicable.
 
Constructor Summary
OsmUser(int id, java.lang.String userName)
          Creates a new instance.
OsmUser(StoreReader sr, StoreClassRegister scr)
          Creates a new instance.
 
Method Summary
 boolean equals(java.lang.Object o)
          
 int getId()
           
 java.lang.String getName()
           
 int hashCode()
          
 void store(StoreWriter sw, StoreClassRegister scr)
          Stores all state to the specified store writer.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NONE

public static final OsmUser NONE
The user instance representing no user available or no user applicable.

Constructor Detail

OsmUser

public OsmUser(int id,
               java.lang.String userName)
Creates a new instance.

Parameters:
id - The userId associated with the user name.
userName - The name of the user that this object represents.

OsmUser

public OsmUser(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.

equals

public boolean equals(java.lang.Object o)

Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()

Overrides:
hashCode in class java.lang.Object

getId

public int getId()
Returns:
The userId.

getName

public java.lang.String getName()
Returns:
The name of the user.