io.github.mrtimeey.herodomainmodel.model.Creation Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of object-finder Show documentation
Show all versions of object-finder Show documentation
Library for finding objects in complex data structures
package io.github.mrtimeey.herodomainmodel.model;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import java.util.Arrays;
import java.util.List;
@JsonSerialize
public record Creation(String creators, List firstAppearances) {
public static Creation of(String creators) {
return new Creation(creators, List.of());
}
public static Creation of(String creators, String... firstAppearances) {
return new Creation(creators, Arrays.stream(firstAppearances).toList());
}
public static Creation of(String creators, List firstAppearances) {
return new Creation(creators, firstAppearances);
}
}