From 8b85eddf44aa2f9d06a1f808d31b2004081a5ab5 Mon Sep 17 00:00:00 2001 From: Mathias Wagner Date: Sun, 17 Sep 2023 17:19:35 +0200 Subject: [PATCH] Updated the LicenseMeta.java --- .../de/licenseapi/entities/LicenseMeta.java | 27 +++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/src/main/java/de/licenseapi/entities/LicenseMeta.java b/src/main/java/de/licenseapi/entities/LicenseMeta.java index 4dcdac5..86047f2 100644 --- a/src/main/java/de/licenseapi/entities/LicenseMeta.java +++ b/src/main/java/de/licenseapi/entities/LicenseMeta.java @@ -37,4 +37,31 @@ public class LicenseMeta { return value; } + /** + * Gets the value of the meta information as {@link Integer} + * + * @return the value of the meta information as {@link Integer} + */ + public int getAsInteger() { + return Integer.parseInt(value); + } + + /** + * Gets the value of the meta information as {@link Double} + * + * @return the value of the meta information as {@link Double} + */ + public double getAsDouble() { + return Double.parseDouble(value); + } + + /** + * Gets the value of the meta information as {@link Boolean} + * + * @return the value of the meta information as {@link Boolean} + */ + public boolean getAsBoolean() { + return Boolean.parseBoolean(value); + } + }