# HG changeset patch # User Felix Wolfsteller # Date 1386277455 -3600 # Node ID ad5238e3e7362c59f12dabaadc34a490856c2d54 # Parent 81ae2a4873f228ea893fc8a42fb782026a0749e9 Cosmetics of WstWriter. Actually, a decent class now. diff -r 81ae2a4873f2 -r ad5238e3e736 artifacts/src/main/java/org/dive4elements/river/exports/WstWriter.java --- a/artifacts/src/main/java/org/dive4elements/river/exports/WstWriter.java Thu Dec 05 19:37:59 2013 +0100 +++ b/artifacts/src/main/java/org/dive4elements/river/exports/WstWriter.java Thu Dec 05 22:04:15 2013 +0100 @@ -30,6 +30,17 @@ /** * A writer that creates WSTs. * + * Wst files follow this basic structure: + * + * HEADER + * Q-LINE + * W-LINES + * Q-LINE + * W-LINES + * ... + * + * where each *LINE consists of X columns that are specified in the header. + * * @author Ingo Weinzierl */ public class WstWriter { @@ -56,13 +67,13 @@ protected double[] qs; - /** * This constructor creates a new WstWriter with a number of Q columns. * - * @param cols The number of columns of the resulting WST. + * @param columns The number of columns of the resulting WST. */ - public WstWriter(int cols) { + public WstWriter(int columns) { + this.cols = columns; this.columnNames = new ArrayList(cols); this.lines = new HashMap(); this.qs = new double[cols]; @@ -100,7 +111,7 @@ /** * This method is used to add a new line to the WST. * - * @param wqkms A 3dim double array with [W,Q, KM]. + * @param wqkms A 3dim double array with [W, Q, KM]. */ public void add(double[] wqkms) { Double km = wqkms[2]; @@ -259,7 +270,8 @@ /** * Get the lines that have alreay been added to this writer - * lines are a map with km as the key and a wstline as value */ + * lines are a map with km as the key and a wstline as value. + */ public Map getLines() { return lines; }