- @Override
- public PostBuilder copyPost(Post post) {
- this.randomId = false;
- this.id = post.getId();
- this.sender = post.getSone();
- this.currentTime = false;
- this.time = post.getTime();
- this.text = post.getText();
- this.recipient = post.getRecipient();
- return this;
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public PostBuilder randomId() {
- randomId = true;
- return this;
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public PostBuilder withId(String id) {
- this.id = id;
- return this;
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public PostBuilder from(Sone sender) {
- this.sender = sender;
- return this;
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public PostBuilder currentTime() {
- currentTime = true;
- return this;
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public PostBuilder withTime(long time) {
- this.time = time;
- return this;
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public PostBuilder withText(String text) {
- this.text = text;
- return this;
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public PostBuilder to(Sone recipient) {
- this.recipient = recipient;
- return this;