EMMA Coverage Report (generated Sun Mar 01 22:06:14 CET 2015)
[all classes][org.h2.index]

COVERAGE SUMMARY FOR SOURCE FILE [MetaCursor.java]

nameclass, %method, %block, %line, %
MetaCursor.java100% (1/1)60%  (3/5)88%  (37/42)75%  (6/8)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class MetaCursor100% (1/1)60%  (3/5)88%  (37/42)75%  (6/8)
get (): Row 0%   (0/1)0%   (0/3)0%   (0/1)
previous (): boolean 0%   (0/1)0%   (0/2)0%   (0/1)
MetaCursor (ArrayList): void 100% (1/1)100% (6/6)100% (3/3)
getSearchRow (): SearchRow 100% (1/1)100% (3/3)100% (1/1)
next (): boolean 100% (1/1)100% (28/28)100% (2/2)

1/*
2 * Copyright 2004-2014 H2 Group. Multiple-Licensed under the MPL 2.0,
3 * and the EPL 1.0 (http://h2database.com/html/license.html).
4 * Initial Developer: H2 Group
5 */
6package org.h2.index;
7 
8import java.util.ArrayList;
9import org.h2.message.DbException;
10import org.h2.result.Row;
11import org.h2.result.SearchRow;
12 
13/**
14 * An index for a meta data table.
15 * This index can only scan through all rows, search is not supported.
16 */
17public class MetaCursor implements Cursor {
18 
19    private Row current;
20    private final ArrayList<Row> rows;
21    private int index;
22 
23    MetaCursor(ArrayList<Row> rows) {
24        this.rows = rows;
25    }
26 
27    @Override
28    public Row get() {
29        return current;
30    }
31 
32    @Override
33    public SearchRow getSearchRow() {
34        return current;
35    }
36 
37    @Override
38    public boolean next() {
39        current = index >= rows.size() ? null : rows.get(index++);
40        return current != null;
41    }
42 
43    @Override
44    public boolean previous() {
45        throw DbException.throwInternalError();
46    }
47 
48}

[all classes][org.h2.index]
EMMA 2.0.5312 (C) Vladimir Roubtsov