public class IdPreMap extends Object
Constructor and Description |
---|
IdPreMap(int id)
Constructor.
|
IdPreMap(IOFile f)
Construct a map by reading it from a file.
|
Modifier and Type | Method and Description |
---|---|
void |
delete(int pre,
int id,
int c)
Delete records.
|
void |
insert(int pre,
int id,
int c)
Insert new record.
|
int |
pre(int id)
Find the PRE value of a given ID.
|
int[] |
pre(int[] ids,
int off,
int len)
Find the PRE values of a given list of IDs.
|
int |
size()
Size of the map.
|
String |
toString() |
void |
write(IOFile file)
Write the map to the specified file.
|
public IdPreMap(int id)
id
- last inserted IDpublic IdPreMap(IOFile f) throws IOException
f
- file to read fromIOException
- I/O error while reading from the filepublic void write(IOFile file) throws IOException
file
- file to write toIOException
- I/O error while writing to the filepublic int pre(int id)
id
- IDpublic int[] pre(int[] ids, int off, int len)
ids
- IDsoff
- start position in ids (inclusive)len
- number of idspublic void insert(int pre, int id, int c)
pre
- record PREid
- record IDc
- number of inserted recordspublic void delete(int pre, int id, int c)
pre
- PRE of the first recordid
- ID of the first deleted recordc
- number of deleted recordspublic int size()
Copyright © 2005–2015 BaseX Team. All rights reserved.