diff --git a/src/main/java/de/tudresden/inf/mci/brailleplot/App.java b/src/main/java/de/tudresden/inf/mci/brailleplot/App.java index 128e99ec106fc6737d3e5aab90e415062abc33e1..f7bcd5653ea47182d275491453e72a968054d960 100644 --- a/src/main/java/de/tudresden/inf/mci/brailleplot/App.java +++ b/src/main/java/de/tudresden/inf/mci/brailleplot/App.java @@ -27,6 +27,7 @@ public final class App { * Main method. * Instantiate application and execute it. * @param args Command line parameters. + * @throws IOException May throw Exception. */ public static void main(final String[] args) throws IOException { App app = App.getInstance(); diff --git a/src/main/java/de/tudresden/inf/mci/brailleplot/csvparser/Axis.java b/src/main/java/de/tudresden/inf/mci/brailleplot/csvparser/Axis.java index 47bfdc0e7e3b097b35b9862a84194b39c47018b9..daa3271298179a1e53843a2d5f9c4ad6a01cf97e 100644 --- a/src/main/java/de/tudresden/inf/mci/brailleplot/csvparser/Axis.java +++ b/src/main/java/de/tudresden/inf/mci/brailleplot/csvparser/Axis.java @@ -10,13 +10,13 @@ public abstract class Axis { // The following offsets can and shall be overwritten by child classes /** X offset of horizontal axis labels. */ - public final double mLabelOffsetHorizontalX; + public double mLabelOffsetHorizontalX; /** Y offset of horizontal axis labels. */ - public final double mLabelOffsetHorizontalY; + public double mLabelOffsetHorizontalY; /** X offset of vertical axis labels. */ - public final double mLabelOffsetVerticalX; + public double mLabelOffsetVerticalX; /** Y offset of vertical axis labels. */ - public final double mLabelOffsetVerticalY; + public double mLabelOffsetVerticalY; protected double mTicInterval; protected Range mTicRange; @@ -24,24 +24,26 @@ public abstract class Axis { protected Range mRange; protected double mLabelInterval; protected Range mLabelRange; - protected final DecimalFormat mDecimalFormat = (DecimalFormat) DecimalFormat.getInstance(Constants.LOCALE); + protected DecimalFormat mDecimalFormat = (DecimalFormat) DecimalFormat.getInstance(Constants.LOCALE); protected String mUnit; protected String mTitle; /** How much the point position shall be shifted - used for nominal axes.*/ - protected final double mPointOffset; + protected double mPointOffset; /** * Constructor setting the label and point offsets. - * @param labelOffsetHorizontalX - * @param labelOffsetHorizontalY - * @param labelOffsetVerticalX - * @param labelOffsetVerticalY - * @param pointOffset + * @param labelOffsetHorizontalX double + * @param labelOffsetHorizontalY double + * @param labelOffsetVerticalX double + * @param labelOffsetVerticalY double + * @param pointOffset double + * @param title String + * @param unit String */ public Axis(final double labelOffsetHorizontalX, final double labelOffsetHorizontalY, final double labelOffsetVerticalX, - final double labelOffsetVerticalY, final double pointOffset, final String title, final String unit) { + final double labelOffsetVerticalY, final double pointOffset, final String title, final String unit) { this.mLabelOffsetHorizontalX = labelOffsetHorizontalX; this.mLabelOffsetHorizontalY = labelOffsetHorizontalY; this.mLabelOffsetVerticalX = labelOffsetVerticalX; @@ -51,15 +53,27 @@ public abstract class Axis { this.mUnit = unit; } - public final AxisIterator ticLines() { + /** + * Iterator for tic lines. + * @return AxisIterator + */ + public AxisIterator ticLines() { return new AxisIterator(mTicRange, mTicInterval); } - public final AxisIterator gridLines() { + /** + * Iterator for grid lines. + * @return AxisIterator + */ + public AxisIterator gridLines() { return new AxisIterator(mRange, mGridInterval); } - public final AxisIterator labelPositions() { + /** + * Iterator for label positions. + * @return AxisIterator + */ + public AxisIterator labelPositions() { return new AxisIterator(mLabelRange, mLabelInterval); } @@ -120,39 +134,75 @@ public abstract class Axis { } - public final double getTicInterval() { + /** + * Getter for mTicInterval. + * @return double mTicInterval + */ + public double getTicInterval() { return mTicInterval; } - public final Range getTicRange() { + /** + * Getter for mTicRange. + * @return double mTicRange + */ + public Range getTicRange() { return mTicRange; } - public final double getmGridInterval() { + /** + * Getter for mGridInterval. + * @return double mGridInterval + */ + public double getmGridInterval() { return mGridInterval; } - public final Range getRange() { + /** + * Getter for mRange. + * @return Range mRange + */ + public Range getRange() { return mRange; } - public final double getLabelInterval() { + /** + * Getter for mLabelInterval. + * @return double mLabelInterval + */ + public double getLabelInterval() { return mLabelInterval; } - public final Range getLabelRange() { + /** + * Getter for mLabelRange. + * @return double mLabelRange + */ + public Range getLabelRange() { return mLabelRange; } - public final String getUnit() { + /** + * Getter for mUnit. + * @return double mUnit + */ + public String getUnit() { return mUnit; } - public final String getTitle() { + /** + * Getter for mTitle. + * @return double mTitle + */ + public String getTitle() { return mTitle; } - public final double getPointOffset() { + /** + * Getter for mPointOffset. + * @return double mPointOffset + */ + public double getPointOffset() { return mPointOffset; } } diff --git a/src/main/java/de/tudresden/inf/mci/brailleplot/csvparser/CategorialPointListList.java b/src/main/java/de/tudresden/inf/mci/brailleplot/csvparser/CategorialPointListList.java index 2dab709afa68f7a8f616bbbca8764cc657bc3474..b5cd66a8abb999a9319bfa7c35b52ea6f9f441ed 100644 --- a/src/main/java/de/tudresden/inf/mci/brailleplot/csvparser/CategorialPointListList.java +++ b/src/main/java/de/tudresden/inf/mci/brailleplot/csvparser/CategorialPointListList.java @@ -15,7 +15,11 @@ public class CategorialPointListList extends PointListList { public List<String> mCategoryNames; private double mMaxYSum = Double.NEGATIVE_INFINITY; - public final XType getXType() { + /** + * Getter for XType. + * @return XType + */ + public XType getXType() { return XType.CATEGORIAL; } @@ -23,11 +27,20 @@ public class CategorialPointListList extends PointListList { mCategoryNames = new ArrayList<>(); } - public final void addCategory(final String name) { + /** + * Adds a category name to mCategoryNames. + * @param name String + */ + public void addCategory(final String name) { mCategoryNames.add(name); } - public final String getCategoryName(final int index) { + /** + * Getter for category name by index. + * @param index int + * @return String name + */ + public String getCategoryName(final int index) { try { return mCategoryNames.get(index); } catch (Exception e) { @@ -35,19 +48,36 @@ public class CategorialPointListList extends PointListList { } } - public final int getCategoryCount() { + /** + * Getter for category count. + * @return int count + */ + public int getCategoryCount() { return mCategoryNames.size(); } - public final void setCategoryNames(final List<String> categoryNames) { + /** + * Setter for category names. + * @param categoryNames List(String) + */ + public void setCategoryNames(final List<String> categoryNames) { this.mCategoryNames = categoryNames; } - public final List<String> getCategoryNames() { + /** + * Getter for list with category names as strings. + * @return List(String) with category names. + */ + public List<String> getCategoryNames() { return mCategoryNames; } - public final double getCategorySum(final int index) { + /** + * Getter for category sum by index. + * @param index int + * @return double sum. + */ + public double getCategorySum(final int index) { double sum = 0; for (PointList pointList : this) { if (pointList.size() > index) { @@ -65,7 +95,11 @@ public class CategorialPointListList extends PointListList { } } - public final double getMaxYSum() { + /** + * Getter for maximum y-value sum. + * @return double sum + */ + public double getMaxYSum() { return mMaxYSum; } } diff --git a/src/main/java/de/tudresden/inf/mci/brailleplot/csvparser/Constants.java b/src/main/java/de/tudresden/inf/mci/brailleplot/csvparser/Constants.java index 31ceeefb6e4cc685e131f26b945566b7c8613036..d7679b3d83fc40f28e119e889a0439dbbf7d267d 100644 --- a/src/main/java/de/tudresden/inf/mci/brailleplot/csvparser/Constants.java +++ b/src/main/java/de/tudresden/inf/mci/brailleplot/csvparser/Constants.java @@ -43,6 +43,10 @@ public final class Constants { private Constants() { } + /** + * Getter for SVG decimal format. + * @return DecimalFormat + */ private static DecimalFormat getSvgDecimalFormat() { DecimalFormat decimalFormat = new DecimalFormat("0.###"); DecimalFormatSymbols dfs = new DecimalFormatSymbols(); diff --git a/src/main/java/de/tudresden/inf/mci/brailleplot/csvparser/CoordinateSystem.java b/src/main/java/de/tudresden/inf/mci/brailleplot/csvparser/CoordinateSystem.java index fe03d6489098b7297b76e05547f1dbdf8305e5d3..d5d7a8f3af0ead886a8ae1aea5a0b085ce99a463 100644 --- a/src/main/java/de/tudresden/inf/mci/brailleplot/csvparser/CoordinateSystem.java +++ b/src/main/java/de/tudresden/inf/mci/brailleplot/csvparser/CoordinateSystem.java @@ -29,10 +29,12 @@ public class CoordinateSystem { * Constructor for a coordinate system with a nominal mX axis. TODO replace * by a factory in order to avoid code duplication * - * @param xCategories - * @param yRange - * @param size - * @param diagramContentMargin + * @param xCategories List(String) + * @param yRange Range + * @param size Point + * @param diagramContentMargin List(Integer) + * @param xUnit String + * @param yUnit String */ public CoordinateSystem(final List<String> xCategories, final Range yRange, final Point size, final List<Integer> diagramContentMargin, final String xUnit, final String yUnit) { mOrigin = new Point(diagramContentMargin.get(CONSTANT), diagramContentMargin.get(0)); @@ -57,11 +59,13 @@ public class CoordinateSystem { * Constructor for a coordinate system with metric axes. TODO replace by a * factory in order to avoid code duplication * - * @param xRange - * @param yRange - * @param size - * @param diagramContentMargin - * @param pi + * @param xRange Range + * @param yRange Range + * @param size Point + * @param diagramContentMargin List(Integer) + * @param pi boolean + * @param xUnit String + * @param yUnit String */ public CoordinateSystem(final Range xRange, final Range yRange, final Point size, final List<Integer> diagramContentMargin, final boolean pi, final String xUnit, final String yUnit) { mOrigin = new Point(diagramContentMargin.get(CONSTANT), diagramContentMargin.get(0)); @@ -191,8 +195,8 @@ public class CoordinateSystem { /** * Converts two virtual points and calculates their real distance. * - * @param point1 - * @param point2 + * @param point1 Point + * @param point2 Point * @return real distance */ public double convertDistance(final Point point1, final Point point2) { diff --git a/src/main/java/de/tudresden/inf/mci/brailleplot/csvparser/CsvDotParser.java b/src/main/java/de/tudresden/inf/mci/brailleplot/csvparser/CsvDotParser.java index 6a1ff79bfc894f393e489d7f99d1a3da4b392ae1..754766ee70c4a8d24947b5d80571c6e99f25bbdb 100644 --- a/src/main/java/de/tudresden/inf/mci/brailleplot/csvparser/CsvDotParser.java +++ b/src/main/java/de/tudresden/inf/mci/brailleplot/csvparser/CsvDotParser.java @@ -15,6 +15,7 @@ public class CsvDotParser extends CsvParseAlgorithm { * Parses scattered point data in horizontal data sets, alternating mX and mY. The * first column contains the row mName in the mX row. * + * @param csvData List(? extends List(String)) * @return the parsed data */ public PointListList parseAsHorizontalDataSets(final List<? extends List<String>> csvData) { @@ -66,6 +67,7 @@ public class CsvDotParser extends CsvParseAlgorithm { * Parses scattered point data in vertical data sets, alternating mX and mY. The * first row contains the column mName in the mX column. * + * @param csvData List(? extends List(String)) * @return the parsed data */ @Override diff --git a/src/main/java/de/tudresden/inf/mci/brailleplot/csvparser/CsvParseAlgorithm.java b/src/main/java/de/tudresden/inf/mci/brailleplot/csvparser/CsvParseAlgorithm.java index 6e723fc16a7a3ef5c0968bccbdddf47837b88a4e..3ea48ec670b07df5154356285e4afa9dd4abf9f0 100644 --- a/src/main/java/de/tudresden/inf/mci/brailleplot/csvparser/CsvParseAlgorithm.java +++ b/src/main/java/de/tudresden/inf/mci/brailleplot/csvparser/CsvParseAlgorithm.java @@ -11,8 +11,8 @@ public abstract class CsvParseAlgorithm { * If the data sets are oriented horizontally, i.e. in rows, parse the rows * into {@link PointListList.PointList PointLists}. * - * @param csvData - * @return + * @param csvData List(? extends List(String)) + * @return PointListList */ public abstract PointListList parseAsHorizontalDataSets(List<? extends List<String>> csvData); @@ -20,8 +20,8 @@ public abstract class CsvParseAlgorithm { * If the data sets are oriented vertically, i.e. in columns, parse the * columns into {@link PointListList.PointList PointLists}. * - * @param csvData - * @return + * @param csvData List(? extends List(String)) + * @return PointListList */ public abstract PointListList parseAsVerticalDataSets(List<? extends List<String>> csvData); diff --git a/src/main/java/de/tudresden/inf/mci/brailleplot/csvparser/CsvParser.java b/src/main/java/de/tudresden/inf/mci/brailleplot/csvparser/CsvParser.java index 79117dff4696b204f79ff03ffe9f432630a5258f..414acf87233ba4c70dc8d5700fe015bf17c8109f 100644 --- a/src/main/java/de/tudresden/inf/mci/brailleplot/csvparser/CsvParser.java +++ b/src/main/java/de/tudresden/inf/mci/brailleplot/csvparser/CsvParser.java @@ -11,7 +11,7 @@ import java.util.ArrayList; import java.util.Arrays; /** - * Class to represent the overall parser. This parser chooses the corresponding parsing algorithm for the data. + * Class to represent the main parser. This parser chooses the corresponding parsing algorithm for the data. */ public class CsvParser { @@ -25,8 +25,8 @@ public class CsvParser { * * @param reader * a reader, like {@link Reader} - * @param separator - * @param quoteChar + * @param separator char + * @param quoteChar char * @throws IOException * if the {@link CSVReader} has problems parsing */ @@ -43,7 +43,13 @@ public class CsvParser { csvReader.close(); } - public final PointListList parse(final CsvType csvType, final CsvOrientation csvOrientation) { + /** + * Chooses the right parsing algorithm. + * @param csvType CsvType + * @param csvOrientation CsvOrientation + * @return PointListList + */ + public PointListList parse(final CsvType csvType, final CsvOrientation csvOrientation) { CsvParseAlgorithm csvParseAlgorithm; LOG.info("Parse die Daten als \"{}\", Orientierung \"{}\"", csvType, csvOrientation); diff --git a/src/main/java/de/tudresden/inf/mci/brailleplot/csvparser/MetricAxis.java b/src/main/java/de/tudresden/inf/mci/brailleplot/csvparser/MetricAxis.java index 5fe3cf03d530b486b70005fedfba6aa2fb7b3233..68e52a30a2bc2b09a5d6f9fd10834e91a131e166 100644 --- a/src/main/java/de/tudresden/inf/mci/brailleplot/csvparser/MetricAxis.java +++ b/src/main/java/de/tudresden/inf/mci/brailleplot/csvparser/MetricAxis.java @@ -117,8 +117,8 @@ public class MetricAxis extends Axis { } /** - * @param dimension - * @param factor + * @param dimension double + * @param factor double */ private void calculateIntervalSteps(final double dimension, final double factor) { int i = 0; @@ -136,8 +136,8 @@ public class MetricAxis extends Axis { } /** - * @param interval - * @param dimension + * @param interval double + * @param dimension double * @return the calculated factor */ private double getFactorForIntervalAndDimension(final double interval, final double dimension) { diff --git a/src/main/java/de/tudresden/inf/mci/brailleplot/csvparser/NominalAxis.java b/src/main/java/de/tudresden/inf/mci/brailleplot/csvparser/NominalAxis.java index 47bec457be3f29c74301409166b00d7aac3710e8..677374fe1f0825b324a230d736e21331119b431b 100644 --- a/src/main/java/de/tudresden/inf/mci/brailleplot/csvparser/NominalAxis.java +++ b/src/main/java/de/tudresden/inf/mci/brailleplot/csvparser/NominalAxis.java @@ -26,9 +26,9 @@ public class NominalAxis extends Axis { * The nominal axis gets constructed so that each tic corresponds to one * category. The tics are however shown. * - * @param categories - * @param size - * @param unit + * @param categories List(String) + * @param size double + * @param unit String */ public NominalAxis(final List<String> categories, final double size, final String unit) { // TODO: upon implementation of vertical nominal axes set the values diff --git a/src/main/java/de/tudresden/inf/mci/brailleplot/csvparser/Point.java b/src/main/java/de/tudresden/inf/mci/brailleplot/csvparser/Point.java index 84b2566e420beb06a37a739ba2c74085cba80051..aaa24e1e7bf7853b2362d84b9d44579a22a67a9f 100644 --- a/src/main/java/de/tudresden/inf/mci/brailleplot/csvparser/Point.java +++ b/src/main/java/de/tudresden/inf/mci/brailleplot/csvparser/Point.java @@ -117,7 +117,7 @@ public class Point implements Comparable<Point> { /** * formats the mX value as an svg compatible decimal value. * - * @return + * @return String */ public String x() { return SvgTools.format2svg(getX()); @@ -126,7 +126,7 @@ public class Point implements Comparable<Point> { /** * formats the mY value as an svg compatible decimal value. * - * @return + * @return String */ public String y() { return SvgTools.format2svg(getY()); @@ -193,7 +193,7 @@ public class Point implements Comparable<Point> { * * @param p2 * | other point - * @return + * @return int */ @Override public int compareTo(final Point p2) { @@ -220,7 +220,7 @@ public class Point implements Comparable<Point> { * * @param p2 * | other point - * @return + * @return int */ public int compareToY(final Point p2) { if (p2 != null) { @@ -238,7 +238,7 @@ public class Point implements Comparable<Point> { * * @param p2 * | other point - * @return + * @return int */ public int compareToX(final Point p2) { if (p2 != null) { @@ -251,35 +251,67 @@ public class Point implements Comparable<Point> { return -1; } - public final double getX() { + /** + * Getter for mX. + * @return double mX + */ + public double getX() { return mX; } - public final void setX(final double x) { + /** + * Setter for mX. + * @param x double + */ + public void setX(final double x) { this.mX = x; } - public final double getY() { + /** + * Getter for mY. + * @return double mY + */ + public double getY() { return mY; } - public final void setY(final double y) { + /** + * Setter for mY. + * @param y double + */ + public void setY(final double y) { this.mY = y; } - public final String getName() { + /** + * Getter for mName. + * @return String mName + */ + public String getName() { return mName; } - public final void setName(final String name) { + /** + * Setter for mName. + * @param name String + */ + public void setName(final String name) { this.mName = name; } - public final Element getSymbol() { + /** + * Getter for mSymbol. + * @return Element mSymbol + */ + public Element getSymbol() { return mSymbol; } - public final void setSymbol(final Element symbol) { + /** + * Setter for mSymbol. + * @param symbol Element + */ + public void setSymbol(final Element symbol) { this.mSymbol = symbol; } diff --git a/src/main/java/de/tudresden/inf/mci/brailleplot/csvparser/PointListList.java b/src/main/java/de/tudresden/inf/mci/brailleplot/csvparser/PointListList.java index 087499a4184480c6cddeda46d6e8a227b24e2791..32173f08ac816ec00cee44c18746e055cd832345 100644 --- a/src/main/java/de/tudresden/inf/mci/brailleplot/csvparser/PointListList.java +++ b/src/main/java/de/tudresden/inf/mci/brailleplot/csvparser/PointListList.java @@ -22,8 +22,9 @@ public class PointListList extends ArrayList<PointListList.PointList> { protected Double mMinY = Double.POSITIVE_INFINITY; /** - * May be extended. - * @return + * Getter for XType. + * + * @return XType */ public XType getXType() { return XType.METRIC; @@ -58,13 +59,19 @@ public class PointListList extends ArrayList<PointListList.PointList> { return success; } - public final boolean add(final List<Point> points) { + /** + * Adds a list of points to the PointListList. + * + * @param points List(Point) + * @return true if success, false if not + */ + public boolean add(final List<Point> points) { PointList pl = new PointList(points); return add(pl); } /** - * May be extended. + * Updates mMaxX, mMaxY, mMinX, mMinY. */ public void updateMinMax() { for (PointList checkPl : this) { @@ -75,23 +82,43 @@ public class PointListList extends ArrayList<PointListList.PointList> { } } - public final double getMaxX() { + /** + * Getter for mMaxX. + * @return double mMaxX + */ + public double getMaxX() { return mMaxX; } - public final double getMaxY() { + /** + * Getter for mMaxY. + * @return double mMaxY + */ + public double getMaxY() { return mMaxY; } - public final double getMinX() { + /** + * Getter for mMinX. + * @return double mMinX + */ + public double getMinX() { return mMinX; } - public final double getMinY() { + /** + * Getter for mMinY. + * @return double mMinY + */ + public double getMinY() { return mMinY; } - public final boolean hasValidMinMaxValues() { + /** + * Checks if min- and max-values are valid. + * @return true if yes, false if no + */ + public boolean hasValidMinMaxValues() { return mMaxX > mMinX && mMaxY > mMinY; } @@ -159,7 +186,13 @@ public class PointListList extends ArrayList<PointListList.PointList> { this(""); } - public final boolean insertSorted(final Point p) { + /** + * Sorted insertion of a Point into the PointList. + * + * @param p Point + * @return true if success, false if not + */ + public boolean insertSorted(final Point p) { mMaxX = Math.max(getMaxX(), p.getX()); mMaxY = Math.max(getMaxY(), p.getY()); mMinX = Math.min(getMinX(), p.getX()); @@ -173,40 +206,75 @@ public class PointListList extends ArrayList<PointListList.PointList> { return returnVal; } - + /** + * Wrapper for insertSorted. + * + * @param index int + * @param element Point + */ @Deprecated - public final void add(final int index, final Point element) { + public void add(final int index, final Point element) { // throw new UnsupportedOperationException("Only insertions via insertSorted are allowed"); this.insertSorted(element); } + /** + * Wrapper for insertSorted. + * + * @param e Point + * @return true if success, false if not + */ @Deprecated - public final boolean add(final Point e) { + public boolean add(final Point e) { // throw new UnsupportedOperationException("Only insertions via insertSorted are allowed"); return this.insertSorted(e); } - public final double getMaxX() { + /** + * Getter for mMaxX. + * @return double mMaxX + */ + public double getMaxX() { return mMaxX; } - public final double getMaxY() { + /** + * Getter for mMaxY. + * @return double mMaxY + */ + public double getMaxY() { return mMaxY; } - public final double getMinX() { + /** + * Getter for mMinX. + * @return double mMinX + */ + public double getMinX() { return mMinX; } - public final double getMinY() { + /** + * Getter for mMinY. + * @return double mMinY + */ + public double getMinY() { return mMinY; } - public final String getName() { + /** + * Getter for mName. + * @return double mName + */ + public String getName() { return mName; } - public final void setName(final String name) { + /** + * Setter for mName. + * @param name String + */ + public void setName(final String name) { this.mName = name; } diff --git a/src/main/java/de/tudresden/inf/mci/brailleplot/csvparser/Range.java b/src/main/java/de/tudresden/inf/mci/brailleplot/csvparser/Range.java index 24ee6e7b14767716de11cd6022abfcf97a9aee03..e64f6c4b8161ea98c47c0526f2eb764e1a160ae6 100644 --- a/src/main/java/de/tudresden/inf/mci/brailleplot/csvparser/Range.java +++ b/src/main/java/de/tudresden/inf/mci/brailleplot/csvparser/Range.java @@ -23,7 +23,7 @@ public class Range { * Constructor with mName. * @param from | start of the range * @param to | end of the range - * @param name + * @param name | String */ public Range(final double from, final double to, final String name) { this.mFrom = from; @@ -97,27 +97,51 @@ public class Range { } - public final double getFrom() { + /** + * Getter for mFrom. + * @return double mFrom. + */ + public double getFrom() { return mFrom; } - public final void setFrom(final double from) { + /** + * Setter for mFrom. + * @param from double + */ + public void setFrom(final double from) { this.mFrom = from; } - public final double getTo() { + /** + * Getter for mTo. + * @return double mTo. + */ + public double getTo() { return mTo; } - public final void setTo(final double to) { + /** + * Setter for mTo. + * @param to double + */ + public void setTo(final double to) { this.mTo = to; } - public final String getName() { + /** + * Getter for mName. + * @return String mName. + */ + public String getName() { return mName; } - public final void setName(final String name) { + /** + * Setter for mName. + * @param name String + */ + public void setName(final String name) { this.mName = name; } } diff --git a/src/main/java/de/tudresden/inf/mci/brailleplot/csvparser/SvgTools.java b/src/main/java/de/tudresden/inf/mci/brailleplot/csvparser/SvgTools.java index 02fd8eb216b5f714a8dfe0bc996002eee578ada0..797a12588427ab93845ebf4cb4fa8919231fbd1d 100644 --- a/src/main/java/de/tudresden/inf/mci/brailleplot/csvparser/SvgTools.java +++ b/src/main/java/de/tudresden/inf/mci/brailleplot/csvparser/SvgTools.java @@ -12,8 +12,8 @@ public final class SvgTools { /** * Format a number for svg usage according to the constant DECIMAL_FORMAT. * - * @param value - * @return + * @param value double + * @return String */ public static String format2svg(final double value) { return Constants.DECIMAL_FORMAT.format(value); diff --git a/src/main/java/de/tudresden/inf/mci/brailleplot/diagrams/BarChart.java b/src/main/java/de/tudresden/inf/mci/brailleplot/diagrams/BarChart.java index cb65b679f9d6d36d094c0fe96f4b7e367e8e0855..0fc3146d49882f378782f1144afd786b0a6d8b0d 100644 --- a/src/main/java/de/tudresden/inf/mci/brailleplot/diagrams/BarChart.java +++ b/src/main/java/de/tudresden/inf/mci/brailleplot/diagrams/BarChart.java @@ -18,16 +18,16 @@ public class BarChart /*implements Renderable*/ { } /** - * Get total number of categories. - * @return + * Getter for the total number of categories. + * @return int number of categories */ public int getCategoryCount() { return mP.getCategoryCount(); } /** - * Get category names in a list. - * @return + * Getter for the category names in a list. + * @return list with category names as strings */ public List<String> getCategoryNames() { return mP.getCategoryNames(); @@ -35,67 +35,67 @@ public class BarChart /*implements Renderable*/ { /** * Add a category. - * @param name + * @param name String */ public void addCategory(final String name) { mP.mCategoryNames.add(name); } /** - * Get category name by index. - * @param index - * @return + * Getter for a category name by index. + * @param index int + * @return category name as a string */ public String getCategoryName(final int index) { return mP.getCategoryName(index); } /** - * Get sum of all the values of a category chosen by index. - * @param index - * @return + * Getter for the sum of all the values of a category chosen by index. + * @param index int + * @return double category sum */ public double getCategorySum(final int index) { return mP.getCategorySum(index); } /** - * Get the the highest sum of y-values. - * @return + * Getter for the the highest sum of y-values. + * @return double maximum y-sum */ public double getMaxYSum() { return mP.getMaxYSum(); } /** - * Get the minimum y-value. - * @return + * Getter for the minimum y-value. + * @return double minimum y-value */ public double getMinY() { return mP.getMinY(); } /** - * Get the maximum y-value. - * @return + * Getter for the maximum y-value. + * @return double maximum y-value */ public double getMaxY() { return mP.getMaxY(); } /** - * Returns a list with x-y-Pairs: x is the index (always just counts from 0 up), y is the value. - * @param index - * @return + * Getter for a list with x-y-Pairs: x is the index (always just counts from 0 up), y is the value. + * @param index int + * @return PointList with the corresponding data set */ public PointListList.PointList getDataSet(final int index) { return (PointListList.PointList) mP.get(index); } /** - * Returns a data set by index. - * @param index - * @return + * Getter for a data set by index. + * @param index int + * @return name of the data set as a string */ public String getDataSetName(final int index) { return mP.get(index).getName(); diff --git a/src/main/java/de/tudresden/inf/mci/brailleplot/diagrams/Diagram.java b/src/main/java/de/tudresden/inf/mci/brailleplot/diagrams/Diagram.java index 33e37d3b7af3267b69091918b8f4567ed7b2bfa7..44a4a4e7c0c408d62b8a3738ebb16f2fc0215b26 100644 --- a/src/main/java/de/tudresden/inf/mci/brailleplot/diagrams/Diagram.java +++ b/src/main/java/de/tudresden/inf/mci/brailleplot/diagrams/Diagram.java @@ -10,50 +10,50 @@ public class Diagram /*implements Renderable*/ { public PointListList mP; /** - * Get the minimum x-value. - * @return + * Getter for the minimum x-value. + * @return double minimum x-value */ public double getMinX() { return mP.getMinX(); } /** - * Get the maximum x-value. - * @return + * Getter for the maximum x-value. + * @return double maximum x-value */ public double getMaxX() { return mP.getMaxX(); } /** - * Get the minimum y-value. - * @return + * Getter for the minimum y-value. + * @return double minimum y-value */ public double getMinY() { return mP.getMinY(); } /** - * Get the maximum y-value. - * @return + * Getter for the maximum y-value. + * @return double maximum y-value */ public double getMaxY() { return mP.getMaxY(); } /** - * Get a data set by index. - * @param index - * @return + * Getter for a data set by index. + * @param index int + * @return PointList with the corresponding data set */ public PointListList.PointList getDataSet(final int index) { return (PointListList.PointList) mP.get(index); } /** - * Get the name of a data set by index. - * @param index - * @return + * Getter for the name of a data set by index. + * @param index int + * @return name of the data set as a string */ public String getDataSetName(final int index) { return mP.get(index).getName(); diff --git a/src/main/java/de/tudresden/inf/mci/brailleplot/diagrams/package-info.java b/src/main/java/de/tudresden/inf/mci/brailleplot/diagrams/package-info.java index d3179677d2bde29cd495c9c355b343158c02ca0e..ce8e1c1e6da3c312c3973e5b65c22b86bcda8801 100644 --- a/src/main/java/de/tudresden/inf/mci/brailleplot/diagrams/package-info.java +++ b/src/main/java/de/tudresden/inf/mci/brailleplot/diagrams/package-info.java @@ -1,4 +1,4 @@ /** - + Classes for diagram representation with with basic data functions. + * Classes for diagram representation with with basic data functions. */ package de.tudresden.inf.mci.brailleplot.diagrams;