Skip to content

Commit

Permalink
use two digits for season and episode in title
Browse files Browse the repository at this point in the history
  • Loading branch information
pidoubleyou committed Apr 29, 2024
1 parent ac39221 commit e6624e1
Showing 1 changed file with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,15 @@ public static Optional<String> getElementValueAsString(final JsonElement aJsonEl
}
return Optional.empty();
}


public static Optional<Integer> getElementValueAsInteger(final JsonElement aJsonElement, final String... aElementIds) {
Optional<JsonElement> rs = JsonUtils.getElement(aJsonElement, aElementIds);
if (rs.isPresent()) {
return Optional.of(rs.get().getAsInt());
}
return Optional.empty();
}

public static Optional<JsonElement> getElement(final JsonElement aJsonElement, final String... aElementIds) {
Optional<JsonElement> rs = Optional.empty();
if (aElementIds == null || aElementIds.length == 0 || aJsonElement == null || !aJsonElement.isJsonObject()) {
Expand Down

0 comments on commit e6624e1

Please sign in to comment.