Memory.java 953 Bytes
Newer Older
Bertrand Goupil's avatar
Bertrand Goupil committed
1 2 3 4 5 6 7 8 9
package fr.limsi.sourceExtractor;

import java.util.ArrayList;
import java.util.concurrent.ConcurrentHashMap;

public class Memory {
	public ConcurrentHashMap<String, String> parsedTexts;
	public ConcurrentHashMap<String, String> docTexts;
	public ConcurrentHashMap<String, ArrayList<Integer>> sentenceOffsetsByFile;
10 11
	public ConcurrentHashMap<String, String> revisionDate;

Bertrand Goupil's avatar
Bertrand Goupil committed
12
	public Memory(ConcurrentHashMap<String, String> parsedTexts, ConcurrentHashMap<String, String> docTexts,
13
			ConcurrentHashMap<String, ArrayList<Integer>> sentenceOffsetsByFile, ConcurrentHashMap<String, String> revisionDate) {
Bertrand Goupil's avatar
Bertrand Goupil committed
14 15 16
		this.parsedTexts = parsedTexts;
		this.docTexts = docTexts;
		this.sentenceOffsetsByFile = sentenceOffsetsByFile;
17
		this.revisionDate = revisionDate;
Bertrand Goupil's avatar
Bertrand Goupil committed
18
	}
19

20 21 22 23
	public void cleanEntry(String fileId) {
		this.parsedTexts.remove(fileId);
		this.docTexts.remove(fileId);
		this.sentenceOffsetsByFile.remove(fileId);
24
		this.revisionDate.remove(fileId);
25
	}
Bertrand Goupil's avatar
Bertrand Goupil committed
26 27

}