EMMA Coverage Report (generated Tue Feb 12 22:23:49 ICT 2008)
[all classes][net.sourceforge.hivegui.table]

COVERAGE SUMMARY FOR SOURCE FILE [EmptyDataListModel.java]

nameclass, %method, %block, %line, %
EmptyDataListModel.java0%   (0/1)0%   (0/14)0%   (0/32)0%   (0/17)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class EmptyDataListModel0%   (0/1)0%   (0/14)0%   (0/32)0%   (0/17)
EmptyDataListModel (Class): void 0%   (0/1)0%   (0/13)0%   (0/4)
addDataListModelListener (DataListModelListener): void 0%   (0/1)0%   (0/1)0%   (0/1)
addRow (Object): void 0%   (0/1)0%   (0/1)0%   (0/1)
addRow (int, Object): void 0%   (0/1)0%   (0/1)0%   (0/1)
clear (): void 0%   (0/1)0%   (0/1)0%   (0/1)
getRow (int): Object 0%   (0/1)0%   (0/2)0%   (0/1)
getRowClass (): Class 0%   (0/1)0%   (0/3)0%   (0/1)
getRowCount (): int 0%   (0/1)0%   (0/2)0%   (0/1)
getRows (): Object [] 0%   (0/1)0%   (0/3)0%   (0/1)
removeDataListModelListener (DataListModelListener): void 0%   (0/1)0%   (0/1)0%   (0/1)
removeRow (Object): void 0%   (0/1)0%   (0/1)0%   (0/1)
removeRow (int): void 0%   (0/1)0%   (0/1)0%   (0/1)
setRow (int, Object): void 0%   (0/1)0%   (0/1)0%   (0/1)
setRows (Object []): void 0%   (0/1)0%   (0/1)0%   (0/1)

1//  Copyright 2004-2007 Jean-Francois Poilpret
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7//     http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14 
15package net.sourceforge.hivegui.table;
16 
17import java.lang.reflect.Array;
18 
19/**
20 * @author Jean-Francois Poilpret
21 */
22public final class EmptyDataListModel<T> implements DataListModel<T>
23{
24        public void                setRows(T[] items)
25        {
26        }
27        
28        public void                addRow(T item)
29        {
30        }
31        
32        public void                addRow(int row, T item)
33        {
34        }
35        
36        public void                setRow(int row, T item)
37        {
38        }
39        
40        public void                removeRow(T item)
41        {
42        }
43        
44        public void                removeRow(int row)
45        {
46        }
47        
48        public void                clear()
49        {
50        }
51                
52        @SuppressWarnings("unchecked") 
53        public EmptyDataListModel(Class<T> beanClass)
54        {
55                _beanClass = beanClass;
56                _emptyArray = (T[]) Array.newInstance(beanClass, 0);
57        }
58        
59        public Class<T>        getRowClass()
60        {
61                return _beanClass;
62        }
63        public int                getRowCount()
64        {
65                return 0;
66        }
67        public T        getRow(int row)
68        {
69                return null;
70        }
71        public T[]        getRows()
72        {
73                return _emptyArray;
74        }
75        
76        // No need for listeners since this model is immutable
77        public void                addDataListModelListener(DataListModelListener listener)
78        {
79        }
80        
81        public void                removeDataListModelListener(DataListModelListener listener)
82        {
83        }
84                
85        final protected Class<T>        _beanClass;
86        final private T[]                        _emptyArray;
87}

[all classes][net.sourceforge.hivegui.table]
EMMA 2.0.5312 (C) Vladimir Roubtsov