/
vorotov.a.vikt
/
MathEquGen
Обзор
Документация
Войти
/
vorotov.a.vikt
/
MathEquGen
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
develop
src/main/java/com/example/chat/logic/component/Transceiver.java
73 строки
2 KB
DudnikSlava
Бот, генерирующий уравнения как на картинках с дополнительными требованиями
18 ноя 2025, 21:58
18 ноя 2025, 21:58
090473d
Код
Авторство
О чём код?
package com.example.chat.logic.component; import org.springframework.context.annotation.Scope; import org.springframework.stereotype.Component; import java.nio.file.Path; import java.util.Collections; import java.util.LinkedList; import java.util.List; @Component @Scope("prototype") public class Transceiver { private final List<Transobject> transobjects = new LinkedList<>(); public List<Transobject> getTransobjects() { return Collections.unmodifiableList(transobjects); } public void clear() { transobjects.clear(); } public void addTransobject(Transobject transobject) { transobjects.add(transobject); } public static class File implements Transobject { private final Path pathToFile; private final String fileName; public File(Path pathToFile, String fileName) { this.pathToFile = pathToFile; this.fileName = fileName; } public Path getPathToFile() { return pathToFile; } public String getFileName() { return fileName; } } public static class Image implements Transobject { private final Path pathToFile; private final String caption; private final String fileName; public Image(Path pathToFile, String caption, String fileName) { this.pathToFile = pathToFile; this.caption = caption; this.fileName = fileName; } public Path getPathToFile() { return pathToFile; } public String getCaption() { return caption; } public String getFileName() { return fileName; } } public interface Transobject { } }