Рефаторинг
This commit is contained in:
parent
44dc657591
commit
7acb40d452
@ -65,7 +65,7 @@ public class BoxAnswer {
|
||||
this.stickerId = stickerId;
|
||||
}
|
||||
|
||||
public BoxAnswer clone() {
|
||||
public BoxAnswer prototype() {
|
||||
return new BoxAnswer(this);
|
||||
}
|
||||
|
||||
|
@ -1,14 +0,0 @@
|
||||
package org.sadtech.bot.core.domain;
|
||||
|
||||
//@TODO: Дописать класс
|
||||
public class Comment extends Content {
|
||||
|
||||
private Integer postId;
|
||||
private String text;
|
||||
private Integer data;
|
||||
|
||||
public Comment() {
|
||||
|
||||
}
|
||||
|
||||
}
|
@ -44,7 +44,7 @@ public class Mail extends Content {
|
||||
this.message = message;
|
||||
}
|
||||
|
||||
public Mail clone() {
|
||||
public Mail prototype() {
|
||||
return new Mail(this);
|
||||
}
|
||||
|
||||
|
@ -1,9 +0,0 @@
|
||||
package org.sadtech.bot.core.repository;
|
||||
|
||||
import org.sadtech.bot.core.domain.Comment;
|
||||
|
||||
public interface CommentRepository {
|
||||
|
||||
void add(Comment comment);
|
||||
|
||||
}
|
@ -1,17 +0,0 @@
|
||||
package org.sadtech.bot.core.repository.impl;
|
||||
|
||||
import org.sadtech.bot.core.domain.Comment;
|
||||
import org.sadtech.bot.core.repository.CommentRepository;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class CommentRepositoryList implements CommentRepository {
|
||||
|
||||
private List<Comment> comments = new ArrayList<>();
|
||||
|
||||
@Override
|
||||
public void add(Comment comment) {
|
||||
comments.add(comment);
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user