LIDDrainmat.java [src/SwmmObjects] Revision: default  Date:
/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package SwmmObjects;

import java.text.DecimalFormat;
import org.apache.commons.lang3.StringUtils;

/**
 *
 * @author Lucas Yaege
 */
public class LIDDrainmat
{
    public double thick; //Thickness of the drainage mat
    public double vRatio; //ratio of void volume to total volume in the mat.
    public double rough; //Manning's n constant used to compute the horizontal flow rate of drained water through the mat.
    
    private DecimalFormat df = new DecimalFormat("#.###");
    
    public LIDDrainmat(double thick, double vRatio, double rough)
    {
        this.thick = thick;
        this.vRatio = vRatio;
        this.rough = rough;
    }
    
    public String toString()
    {
        return toString( 17 );
    }

    public String toString( int padDistance )
    {
        StringBuilder sb = new StringBuilder();

        //Data
        sb.append( StringUtils.rightPad( df.format( this.thick ), padDistance ) );
        sb.append( StringUtils.rightPad( df.format( this.vRatio ), padDistance ) );
        sb.append( StringUtils.rightPad( df.format( this.rough ), padDistance ) );

        return sb.toString();
    }
}