Skip to content
Snippets Groups Projects
Commit a23d0205 authored by Christopher Bohn's avatar Christopher Bohn :thinking:
Browse files

Added Maven Javadoc plugin

parent a0254273
No related branches found
No related tags found
No related merge requests found
...@@ -19,9 +19,29 @@ ...@@ -19,9 +19,29 @@
<target>8</target> <target>8</target>
</configuration> </configuration>
</plugin> </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> </plugins>
</build> </build>
<!--
<reporting>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.1.1</version>
</plugin>
</plugins>
</reporting>
-->
<dependencies> <dependencies>
<dependency> <dependency>
<groupId>junit</groupId> <groupId>junit</groupId>
...@@ -29,6 +49,13 @@ ...@@ -29,6 +49,13 @@
<version>4.12</version> <version>4.12</version>
<scope>test</scope> <scope>test</scope>
</dependency> </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> <dependency>
<groupId>com.vdurmont</groupId> <groupId>com.vdurmont</groupId>
<artifactId>emoji-java</artifactId> <artifactId>emoji-java</artifactId>
......
...@@ -55,19 +55,22 @@ public class StringBox { ...@@ -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 * 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 * 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> * 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) { public StringBox(int boxHeight, int boxWidth) {
if (maximumHeight > 0 && maximumWidth > 0) { if (boxHeight > 0 && boxWidth > 0) {
this.maximumHeight = maximumHeight; this.maximumHeight = boxHeight;
this.maximumWidth = maximumWidth; this.maximumWidth = boxWidth;
rows = new StringRow[maximumHeight]; rows = new StringRow[boxHeight];
for (int i = 0; i < maximumHeight; i++) { for (int i = 0; i < boxHeight; i++) {
rows[i] = new StringRow(maximumWidth); rows[i] = new StringRow(boxWidth);
} }
logicalHeight = 0; logicalHeight = 0;
} else { } else {
throw new IllegalArgumentException("String Box must be at least 1 character wide by 1 character tall. " + 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.");
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment