X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Fnet%2Fpterodactylus%2Fsone%2Fdatabase%2FPostBuilder.java;h=0114ac555ed30b57e7bb5b5849b3ab3be35f8f51;hb=2f4dcbcbc66688f159d96ebfb04d8bd5f96e9c28;hp=449147a32ece51042a15bf2275b467f87c2fbe8f;hpb=6f019de1d4d9742981d851ac3c9097cca8bff58e;p=Sone.git diff --git a/src/main/java/net/pterodactylus/sone/database/PostBuilder.java b/src/main/java/net/pterodactylus/sone/database/PostBuilder.java index 449147a..0114ac5 100644 --- a/src/main/java/net/pterodactylus/sone/database/PostBuilder.java +++ b/src/main/java/net/pterodactylus/sone/database/PostBuilder.java @@ -20,6 +20,8 @@ package net.pterodactylus.sone.database; import net.pterodactylus.sone.data.Post; import net.pterodactylus.sone.data.Sone; +import com.google.common.base.Optional; + /** * Builder for {@link Post} objects. *

@@ -43,26 +45,6 @@ import net.pterodactylus.sone.data.Sone; public interface PostBuilder { /** - * Copies all attributes of the given post to this post builder. - * - * @param post - * The post whose attributes to copy into this builder - * @return This builder - * @throws NullPointerException - * if {@code post} is {@code null} - */ - public PostBuilder copyPost(Post post) throws NullPointerException; - - /** - * Configures this builder to use the given Sone as sender of the new post. - * - * @param senderId - * The ID of the sender of the post - * @return This post builder - */ - public PostBuilder from(String senderId); - - /** * Configures this builder to use a random ID for the new post. If this * method is used, {@link #withId(String)} must not be used. * @@ -115,7 +97,7 @@ public interface PostBuilder { * The ID of the recipient of the post * @return This post builder */ - public PostBuilder to(String recipientId); + public PostBuilder to(Optional recipientId); /** * Verifies this builder’s configuration and creates a new post.