Code example for ConcurrentSkipListMap

Methods: put

0
    public void tearDown() { 
    } 
 
    private ConcurrentSkipListMap<String, AbstractGraphRow> createTestModel()
    { 
        ConcurrentSkipListMap<String, AbstractGraphRow> testModel = new ConcurrentSkipListMap<String, AbstractGraphRow>();
        Calendar now = Calendar.getInstance();
        now.set(Calendar.HOUR_OF_DAY, 10);
        now.set(Calendar.MINUTE, 30);
        now.set(Calendar.SECOND, 0);
        now.set(Calendar.MILLISECOND, 500);
 
        GraphRowAverages row1 = new GraphRowAverages();
        GraphRowAverages row2 = new GraphRowAverages();
        GraphRowAverages row3 = new GraphRowAverages();
 
        testModel.put("row1", row1);
        testModel.put("row2", row2);
        testModel.put("row3", row3);
 
        row1.add(now.getTimeInMillis(), 10);
        row2.add(now.getTimeInMillis(), 20);
 
        now.set(Calendar.SECOND, 10);