Skip to content

Commit

Permalink
Created [structures](src/main/java/it/fulminazzo/fulmicollection/stru…
Browse files Browse the repository at this point in the history
…ctures) package.

Added [Tuple](src/main/java/it/fulminazzo/fulmicollection/structures/Tuple.java) type.
Added [Triple](src/main/java/it/fulminazzo/fulmicollection/structures/Triple.java) type.
Fixed enums not being displayed in `Printable#convertToJson`.
  • Loading branch information
Fulminazzo committed Mar 5, 2024
1 parent 1bb79dd commit 72c8641
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ plugins {
}

group = 'it.fulminazzo'
version = '1.4'
version = '1.4.1'

repositories {
mavenCentral()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ public abstract class Printable {
*/
public static @NotNull String convertToJson(@Nullable Object object) {
if (object == null) return "null";
else if (object instanceof Enum<?>) return ((Enum<?>) object).name();
else if (object instanceof String) return String.format("\"%s\"", object);
else if (ReflectionUtils.isPrimitiveOrWrapper(object.getClass())) return object.toString();
else if (object instanceof Iterable) {
Expand Down

0 comments on commit 72c8641

Please sign in to comment.