Package org.eclipse.mat.parser.index

## Class IndexWriter.LongIndexCollectorUncompressed

- java.lang.Object
- - org.eclipse.mat.parser.index.IndexWriter.LongIndexCollectorUncompressed

Enclosing class:
  IndexWriter

    public static class IndexWriter.LongIndexCollectorUncompressed
    extends Object

Build a int to long index.

### Constructor Summary

Constructors
`LongIndexCollectorUncompressed​(int size)` Construct a collector of the given size.

### Method Summary

All Methods Instance Methods Concrete Methods
`long` `get​(int index)` Retrieve an entry.
`void` `set​(int index, long value)` Add one entry.
`IIndexReader.IOne2LongIndex` `writeTo​(File indexFile)` Write the in-memory mapping to disk and return a reader.

### Methods inherited from class java.lang.Object

`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### LongIndexCollectorUncompressed

    public LongIndexCollectorUncompressed​(int size)

Construct a collector of the given size.

Parameters:
  `size` - the number of entries

### Method Detail

#### set

    public void set​(int index,
                    long value)

Add one entry.

Parameters:
  `index` - the int value
  `value` - the corresponding long

#### get

    public long get​(int index)

Retrieve an entry.

Parameters:
  `index` - the int key
Returns:
  the long value

#### writeTo

    public IIndexReader.IOne2LongIndex writeTo​(File indexFile)
                                        throws IOException

Write the in-memory mapping to disk and return a reader.

Parameters:
  `indexFile` - the output file
Returns:
  a reader for the index
Throws:
  `IOException` - if a problem occurs with the write