Adds and improves comments for server types and profile

This commit is contained in:
2020-08-19 10:39:24 +02:00
parent e71e95df7f
commit d06cf4114a
11 changed files with 41 additions and 19 deletions

View File

@ -12,7 +12,7 @@ import java.io.*;
import java.util.ArrayList;
/**
* Contains all user settings, and a list of servers.
* Keeps track of a set of servers and some user settings
*
* @author Kristian Knarvik <kristian.knarvik@knett.no>
* @version 1.0.0
@ -41,9 +41,9 @@ public class Profile {
/**
* Instantiates a new profile
*
* @param name <p>The name of the profile</p>
* @param name <p>The name of the profile</p>
* @param runInBackground <p>Whether to run the software in the background the next time it starts</p>
* @param delayStartup <p>Whether to delay the startup of servers</p>
* @param delayStartup <p>Whether to delay the startup of servers</p>
*/
private Profile(String name, boolean runInBackground, int delayStartup) {
this.collections = new ArrayList<>();
@ -65,7 +65,7 @@ public class Profile {
/**
* Gets whether the software should keep running in the background
*
* @return <p>Whether the software should keep running in the backgound</p>
* @return <p>Whether the software should keep running in the background</p>
*/
public boolean getRunInBackground() {
return this.runInBackground;
@ -83,7 +83,7 @@ public class Profile {
/**
* Gets the number of seconds to delay startup
*
* @return <p>The number of seconds to delay starup</p>
* @return <p>The number of seconds to delay startup</p>
*/
public int getDelayStartup() {
return this.delayStartup;
@ -119,10 +119,10 @@ public class Profile {
}
/**
* Gets a Collection object by name.
* Gets a collection given its name
*
* @param name The name of the collection.
* @return A collection object.
* @param name <p>The name of the collection to get</p>
* @return <p>A collection or null if no collection exists with the given name</p>
*/
public Collection getCollection(String name) {
for (Collection collection : this.collections) {
@ -134,9 +134,9 @@ public class Profile {
}
/**
* Adds a collection to the profile if the name is valid.
* Adds a collection to the profile if the name is valid
*
* @param name The name of the collection and its elements.
* @param name <p>The name of the collection and its elements</p>
*/
public void addCollection(String name) throws ConfigurationException {
if (name == null) { //If a user cancels or crosses out window
@ -247,4 +247,5 @@ public class Profile {
}
return profile;
}
}