Project

General

Profile

Download (853 Bytes) Statistics
| Branch: | Tag: | Revision:
1
/**
2
* Copyright (C) 2017 EDIT
3
* European Distributed Institute of Taxonomy
4
* http://www.e-taxonomy.eu
5
*
6
* The contents of this file are subject to the Mozilla Public License Version 1.1
7
* See LICENSE.TXT at the top of this package for the full license terms.
8
*/
9
package eu.etaxonomy.cdm.vaadin.component;
10

    
11
import java.util.ArrayList;
12

    
13
import com.vaadin.ui.Component;
14

    
15
/**
16
 * @author a.kohlbecker
17
 * @since Dec 21, 2017
18
 *
19
 */
20
public class CollectionRowItemCollection extends ArrayList<Component> {
21

    
22
    private static final long serialVersionUID = -5604424783816645364L;
23

    
24
    @SuppressWarnings("unchecked")
25
    public <T extends Component> T getComponent(Class<T> type, int rowposition){
26
        Component c = get(rowposition);
27
        if(type.equals(c.getClass())){
28
            return (T)c;
29
        } else {
30
            return null;
31
        }
32
    }
33

    
34
}
(4-4/10)