Code example for ConcurrentSkipListMap

0
import org.xml.sax.SAXException; 
import com.hp.hpl.jena.rdf.model.Model; 
 
public class QueryTestData implements Serializable
{ 
	public SortedMap<Integer, String> id2Question = new ConcurrentSkipListMap<Integer, String>();
	public SortedMap<Integer, String> id2Query = new ConcurrentSkipListMap<Integer, String>();
	public SortedMap<Integer, Set<String>> id2Answers = new ConcurrentSkipListMap<Integer, Set<String>>();
	public SortedMap<Integer, LearnStatus> id2LearnStatus = new ConcurrentSkipListMap<Integer, LearnStatus>();
	private static final int	MAXIMUM_QUESTIONS	= Integer.MAX_VALUE;
 
	private static final String persistancePath = "cache/"+SPARQLTemplateBasedLearner3Test.class.getSimpleName()+'/'+QueryTestData.class.getSimpleName();
 
	/** Saves the test data to a binary file to a default location overwriting the last save. Uses serialization. **/ 
	public synchronized void save() 
	{ 
		try 
		{ 
			ObjectOutputStream oos = new ObjectOutputStream(new FileOutputStream(new File(persistancePath)));
			oos.writeObject(this);
			oos.close();