Add private constructors static classes.

This commit is contained in:
Jan Philipp Timme 2014-11-04 18:42:11 +01:00
parent 380dbce420
commit cf8ff46dfb
4 changed files with 24 additions and 0 deletions

View File

@ -21,6 +21,12 @@ public class SoundSystem {
private static SourceDataLine sourceDataLine = null;
/**
* Private constructor, this class will never be instantiated.
*/
private SoundSystem() {}
/**
* Get mixer info and return available sound cards.
*/

View File

@ -11,6 +11,12 @@ import java.util.zip.ZipInputStream;
public class CodeEnvironment {
/**
* Private constructor, this class will never be instantiated.
*/
private CodeEnvironment() {}
/**
* Returns true if the program is run out of a jar.
*/

View File

@ -7,4 +7,10 @@ public class GameConfig {
public static int windowWidth;
public static int windowHeight;
/**
* Private constructor, this class will never be instantiated.
*/
private GameConfig() {}
}

View File

@ -17,6 +17,12 @@ public class Loader {
Loader.images = new Hashtable<String, BufferedImage>();
}
/**
* Private constructor, this class will never be instantiated.
*/
private Loader() {}
/**
* Return the loaded BufferedImage by its filename.