org.openstreetmap.osmosis.core.store
Class LongLongIndexElement

java.lang.Object
  extended by org.openstreetmap.osmosis.core.store.LongLongIndexElement
All Implemented Interfaces:
IndexElement<java.lang.Long>, Storeable

public class LongLongIndexElement
extends java.lang.Object
implements IndexElement<java.lang.Long>

A single index element for a long-long index.

Author:
Brett Henderson

Constructor Summary
LongLongIndexElement(long id, long value)
          Creates a new instance.
LongLongIndexElement(StoreReader sr, StoreClassRegister scr)
          Creates a new instance.
 
Method Summary
 long getId()
          Returns the id of this index element.
 java.lang.Long getKey()
          Returns the key associated with this element for the purposes of indexing.
 long getValue()
          Returns the value of this index element.
 void store(StoreWriter writer, StoreClassRegister storeClassRegister)
          Stores all state to the specified store writer.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LongLongIndexElement

public LongLongIndexElement(long id,
                            long value)
Creates a new instance.

Parameters:
id - The value identifier.
value - The data value.

LongLongIndexElement

public LongLongIndexElement(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 writer,
                  StoreClassRegister storeClassRegister)
Stores all state to the specified store writer.

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

getKey

public java.lang.Long getKey()
Returns the key associated with this element for the purposes of indexing.

Specified by:
getKey in interface IndexElement<java.lang.Long>
Returns:
The key of the index element.

getId

public long getId()
Returns the id of this index element.

Returns:
The index id.

getValue

public long getValue()
Returns the value of this index element.

Returns:
The index value.