package com.pack.modeler.dto;

import lombok.Data;

import java.text.DecimalFormat;

@Data
public class DiagramDTO {
    String url;

    int traces;
    int nodes;
    String density;
    String cohesion;
    String coupling;
    String cnc;

    public DiagramDTO(String _url, int _traces, int _nodes, double _density, double _cohesion, double _coupling, double _cnc){
        this.url = _url;

        DecimalFormat df = new DecimalFormat("0.000");

        this.traces = _traces;
        this.nodes = _nodes;
        this.density = df.format(_density);
        this.cohesion = df.format(_cohesion);
        this.coupling = df.format(_coupling);
        this.cnc = df.format(_cnc);
    }
}
