diff --git a/src/main/java/com/houarizegai/calculator/theme/ThemeLoader.java b/src/main/java/com/houarizegai/calculator/theme/ThemeLoader.java
index e01f81e..3ba56fa 100644
--- a/src/main/java/com/houarizegai/calculator/theme/ThemeLoader.java
+++ b/src/main/java/com/houarizegai/calculator/theme/ThemeLoader.java
@@ -16,6 +16,17 @@ private ThemeLoader() {
throw new AssertionError("Constructor is not allowed");
}
+ /**
+ * Loads themes from the application.yaml file and returns them as a map.
+ *
+ * @return A map containing the loaded themes.
+ * @throws IOException if an I/O error occurs while reading the application.yaml file.
+ *
+ * Example:
+ *
{@code
+ * Map themes = loadThemes();
+ * }
+ */
public static Map loadThemes() {
ObjectMapper mapper = new ObjectMapper(new YAMLFactory());
@@ -28,6 +39,18 @@ public static Map loadThemes() {
}
}
+ /**
+ * Loads themes from the specified YAML file and returns a map of theme names to Theme objects.
+ *
+ * @param theme the name of the theme to load
+ * @return a map of theme names to Theme objects
+ * @throws IOException if an error occurs while reading the YAML file
+ *
+ * Example:
+ * {@code
+ * Map themes = loadThemes("default");
+ * }
+ */
public static Map loadThemes(String theme) {
ObjectMapper mapper = new ObjectMapper(new YAMLFactory());
mapper.findAndRegisterModules();
@@ -39,6 +62,18 @@ public static Map loadThemes(String theme) {
}
}
+ /**
+ * Loads themes from the specified YAML file and returns a map of theme names to Theme objects.
+ *
+ * @param theme the theme to load
+ * @param dType the type of the theme
+ * @return a map of theme names to Theme objects
+ * @throws IOException if an I/O error occurs while reading the YAML file
+ *
+ * Example:
+ *
+ * Map themes = loadThemes("default", "dark");
+ */
public static Map loadThemes(String theme, String dType) {
ObjectMapper mapper = new ObjectMapper(new YAMLFactory());
mapper.findAndRegisterModules();