use of com.faendir.zachtronics.bot.sz.model.SzCategory in project zachtronics-leaderboard-bot by F43nd1r.
the class SzRecordDTO method fromCategoryRecord.
@NotNull
public static SzRecordDTO fromCategoryRecord(@NotNull CategoryRecord<SzRecord, SzCategory> categoryRecord) {
SzRecord record = categoryRecord.getRecord();
Set<SzCategory> categories = categoryRecord.getCategories();
return new SzRecordDTO(SzScoreDTO.fromScore(record.getScore()), record.getScore().toDisplayString(DisplayContext.plainText()), record.getAuthor(), record.getDataLink(), UtilsKt.smartFormat(categories, UtilsKt.toMetricsTree(record.getPuzzle().getSupportedCategories())));
}
Aggregations