Package org.eclipse.mat.parser.index
Class IndexWriter.Identifier
java.lang.Object
org.eclipse.mat.parser.index.IndexWriter.Identifier
- All Implemented Interfaces:
- IIndexReader,- IIndexReader.IOne2LongIndex
- Enclosing class:
- IndexWriter
Used to collect the objects by address.
- 
Nested Class SummaryNested classes/interfaces inherited from interface org.eclipse.mat.parser.index.IIndexReaderIIndexReader.IOne2LongIndex, IIndexReader.IOne2ManyIndex, IIndexReader.IOne2ManyObjectsIndex, IIndexReader.IOne2OneIndex, IIndexReader.IOne2SizeIndex
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidadd(long id) Add an object.voidclose()Close the backing file.voiddelete()Delete the backing file.longget(int index) Look up a long from an int in the index.long[]getNext(int index, int length) Look up long from an range of int keys in the index.iterator()Iterate through the object addresses.intreverse(long val) Find the int corresponding to the long in the index value.intsize()Size of the indexvoidsort()Sort the addresses of the objects in order.voidunload()Clear the caches.
- 
Constructor Details- 
Identifierpublic Identifier()
 
- 
- 
Method Details- 
addpublic void add(long id) Add an object.- Parameters:
- id- the object address
 
- 
sortpublic void sort()Sort the addresses of the objects in order. Also puts all of the added addresses into an array. Makes a reverse lookup easier.
- 
sizepublic int size()Description copied from interface:IIndexReaderSize of the index- Specified by:
- sizein interface- IIndexReader
- Returns:
- number of entries
 
- 
getpublic long get(int index) Description copied from interface:IIndexReader.IOne2LongIndexLook up a long from an int in the index.- Specified by:
- getin interface- IIndexReader.IOne2LongIndex
- Parameters:
- index- the key
- Returns:
- the long
 
- 
reversepublic int reverse(long val) Description copied from interface:IIndexReader.IOne2LongIndexFind the int corresponding to the long in the index value. The reverse ofIIndexReader.IOne2LongIndex.get(int)- Specified by:
- reversein interface- IIndexReader.IOne2LongIndex
- Parameters:
- val- the value to look up
- Returns:
- the correspond int key in the index
 
- 
iteratorIterate through the object addresses.- Returns:
- the iterator
 
- 
getNextpublic long[] getNext(int index, int length) Description copied from interface:IIndexReader.IOne2LongIndexLook up long from an range of int keys in the index.- Specified by:
- getNextin interface- IIndexReader.IOne2LongIndex
- Parameters:
- index- the starting point
- length- the number of items to look up
- Returns:
- an array of longs corresponding to the input
 
- 
closeDescription copied from interface:IIndexReaderClose the backing file.- Specified by:
- closein interface- IIndexReader
- Throws:
- IOException
 
- 
deletepublic void delete()Description copied from interface:IIndexReaderDelete the backing file.- Specified by:
- deletein interface- IIndexReader
 
- 
unloadDescription copied from interface:IIndexReaderClear the caches. Used when the indexes are not current in use and the memory needs to be reclaimed such as when building the dominator tree.- Specified by:
- unloadin interface- IIndexReader
- Throws:
- IOException
 
 
-