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 @@
<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>
......
......@@ -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.");
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment