LIDRoofDrain.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 LIDRoofDrain
{
public double flowRate;
private DecimalFormat df = new DecimalFormat("#.###");
LIDRoofDrain( double flowRate )
{
this.flowRate = flowRate;
}
@Override
public String toString()
{
return toString( 17 );
}
public String toString( int padDistance )
{
StringBuilder sb = new StringBuilder();
//Data
sb.append( StringUtils.rightPad( df.format( this.flowRate ), padDistance ) );
return sb.toString();
}
}