From a23d0205732942621e3c574c7bc94c09b8d13bd5 Mon Sep 17 00:00:00 2001 From: Christopher Bohn <bohn@unl.edu> Date: Mon, 24 Feb 2020 19:02:12 -0600 Subject: [PATCH] Added Maven Javadoc plugin --- pom.xml | 27 +++++++++++++++++++ src/main/java/edu/unl/cse/bohn/StringBox.java | 19 +++++++------ 2 files changed, 38 insertions(+), 8 deletions(-) diff --git a/pom.xml b/pom.xml index e6f5cd0..15530b7 100644 --- a/pom.xml +++ b/pom.xml @@ -19,9 +19,29 @@ <target>8</target> </configuration> </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-javadoc-plugin</artifactId> + <version>3.1.1</version> + <configuration> + <source>8</source> + </configuration> + </plugin> </plugins> </build> +<!-- + <reporting> + <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-javadoc-plugin</artifactId> + <version>3.1.1</version> + </plugin> + </plugins> + </reporting> +--> + <dependencies> <dependency> <groupId>junit</groupId> @@ -29,6 +49,13 @@ <version>4.12</version> <scope>test</scope> </dependency> + <!-- https://mvnrepository.com/artifact/org.apache.maven.plugins/maven-javadoc-plugin --> + <dependency> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-javadoc-plugin</artifactId> + <version>3.1.1</version> + </dependency> + <dependency> <groupId>com.vdurmont</groupId> <artifactId>emoji-java</artifactId> diff --git a/src/main/java/edu/unl/cse/bohn/StringBox.java b/src/main/java/edu/unl/cse/bohn/StringBox.java index baa0d8a..d0d3d28 100644 --- a/src/main/java/edu/unl/cse/bohn/StringBox.java +++ b/src/main/java/edu/unl/cse/bohn/StringBox.java @@ -55,19 +55,22 @@ public class StringBox { * printed with <code>System.out.print()</code> then it will leave the cursor at the end of the last line without * scrolling the top of the string off of the screen. This particular style would be useful if you place the * prompt on the last line.</p> + * + * @param boxHeight the number of rows in this StringBox + * @param boxWidth the number of columns in this StringBox */ - public StringBox(int maximumHeight, int maximumWidth) { - if (maximumHeight > 0 && maximumWidth > 0) { - this.maximumHeight = maximumHeight; - this.maximumWidth = maximumWidth; - rows = new StringRow[maximumHeight]; - for (int i = 0; i < maximumHeight; i++) { - rows[i] = new StringRow(maximumWidth); + public StringBox(int boxHeight, int boxWidth) { + if (boxHeight > 0 && boxWidth > 0) { + this.maximumHeight = boxHeight; + this.maximumWidth = boxWidth; + rows = new StringRow[boxHeight]; + for (int i = 0; i < boxHeight; i++) { + rows[i] = new StringRow(boxWidth); } logicalHeight = 0; } else { throw new IllegalArgumentException("String Box must be at least 1 character wide by 1 character tall. " + - "Dimensions " + maximumWidth + "×" + maximumHeight + " are too small."); + "Dimensions " + boxWidth + "×" + boxHeight + " are too small."); } } -- GitLab