Merge branch 'master' into dev
This commit is contained in:
commit
8a05ffd968
@ -35,6 +35,16 @@ public enum FileTypeEnum {
|
||||
return fromValue(type);
|
||||
}
|
||||
|
||||
public static FileTypeEnum valueOfLikeSuffix(String suffix) {
|
||||
if (suffix == null) {
|
||||
return UNKNOWN;
|
||||
}
|
||||
return Arrays.stream(FileTypeEnum.values())
|
||||
.filter(e -> e.getSuffix().contains(suffix))
|
||||
.findFirst()
|
||||
.orElse(UNKNOWN);
|
||||
}
|
||||
|
||||
@JsonCreator(mode = JsonCreator.Mode.DELEGATING)
|
||||
public static FileTypeEnum fromValue(String value) {
|
||||
if (value == null) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user