org.openstreetmap.osmosis.core.store
Class IntegerLongIndexElement

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

public class IntegerLongIndexElement
extends java.lang.Object
implements IndexElement<java.lang.Integer>

A single index element for an int-long index.

Author:
Brett Henderson

Constructor Summary
IntegerLongIndexElement(int id, long value)
          Creates a new instance.
IntegerLongIndexElement(StoreReader sr, StoreClassRegister scr)
          Creates a new instance.
 
Method Summary
 int getId()
          Returns the id of this index element.
 java.lang.Integer 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

IntegerLongIndexElement

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

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

IntegerLongIndexElement

public IntegerLongIndexElement(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.Integer getKey()
Returns the key associated with this element for the purposes of indexing.

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

getId

public int 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.