documentation for all major modules
This commit is contained in:
@@ -1,5 +1,8 @@
|
||||
package client;
|
||||
|
||||
/**
|
||||
* This class aims to make the username available to all controllers. (Recommended by JavaFX, because otherwise, FXMLLoader bugs and doesn't switch scenes properly.)
|
||||
*/
|
||||
public class UsernameSingleton {
|
||||
private static UsernameSingleton instance;
|
||||
private String username;
|
||||
@@ -7,6 +10,10 @@ public class UsernameSingleton {
|
||||
private UsernameSingleton() {
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the instance of the singleton.
|
||||
* @return the instance
|
||||
*/
|
||||
public static UsernameSingleton getInstance() {
|
||||
if (instance == null) {
|
||||
instance = new UsernameSingleton();
|
||||
|
||||
Reference in New Issue
Block a user