diff --git a/Projekte/mdga/model/src/main/java/pp/mdga/Resources.java b/Projekte/mdga/model/src/main/java/pp/mdga/Resources.java index f721043d..13a60c48 100644 --- a/Projekte/mdga/model/src/main/java/pp/mdga/Resources.java +++ b/Projekte/mdga/model/src/main/java/pp/mdga/Resources.java @@ -32,14 +32,41 @@ public static String stringLookup(String key) { return BUNDLE.getString(key); } + /** + * Gets a int for the given key from the resource bundle in {@linkplain #BUNDLE}. + * + * @param key the key for the desired string + * @return the string for the given key + * @throws NullPointerException if {@code key} is {@code null} + * @throws java.util.MissingResourceException if no object for the given key can be found + * @throws ClassCastException if the object found for the given key is not a string + */ public static int intLookup(String key) { return Integer.parseInt(BUNDLE.getString(key)); } + /** + * Gets a boolean for the given key from the resource bundle in {@linkplain #BUNDLE}. + * + * @param key the key for the desired string + * @return the string for the given key + * @throws NullPointerException if {@code key} is {@code null} + * @throws java.util.MissingResourceException if no object for the given key can be found + * @throws ClassCastException if the object found for the given key is not a string + */ public static boolean boolLookup(String key) { return Boolean.parseBoolean(BUNDLE.getString(key)); } + /** + * Gets a double for the given key from the resource bundle in {@linkplain #BUNDLE}. + * + * @param key the key for the desired string + * @return the string for the given key + * @throws NullPointerException if {@code key} is {@code null} + * @throws java.util.MissingResourceException if no object for the given key can be found + * @throws ClassCastException if the object found for the given key is not a string + */ public static double doubleLookup(String key) { return Double.parseDouble(BUNDLE.getString(key)); }