Klasse.java 871 Bytes
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
package de._82grfl1bif.KPI_Visualizer.data;

public class Klasse {
    public String name;
    public String path;

    public int qloc;
    public int loc;
    public int commits;
    public int depth;

    public final int id;

    public int functions;
    public int variables;



    public Klasse(int id, String name, String path, int qloc, int loc, int commits, int functions, int variables){
        this.id = id;
        this.commits = commits;
        this.depth = getDepthOfPath(path);
        this.loc = loc;
        this.qloc = qloc;
        this.functions = functions;
        this.variables = variables;
        this.name = name;
        this.path = path;
    }

    private int getDepthOfPath(String path){
        int result = -1;
        if(path.contains("tmp")){
            result = path.split("/").length-2;
        }
        return result;
    }

}