X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Fnet%2Fpterodactylus%2Fsone%2Fdatabase%2FSoneProvider.java;h=bbe0abf5ab85926aeab9e835be69a9a833843539;hb=45803a1c678d6811f7bbf85d50c79844031be0f0;hp=b1b1eb48dadce65252659879e3da7d79f5a2fe22;hpb=8f02544d31f323ae9053dd9a11a99eacd8cf5bcd;p=Sone.git diff --git a/src/main/java/net/pterodactylus/sone/database/SoneProvider.java b/src/main/java/net/pterodactylus/sone/database/SoneProvider.java index b1b1eb4..bbe0abf 100644 --- a/src/main/java/net/pterodactylus/sone/database/SoneProvider.java +++ b/src/main/java/net/pterodactylus/sone/database/SoneProvider.java @@ -19,6 +19,8 @@ package net.pterodactylus.sone.database; import net.pterodactylus.sone.data.Sone; +import com.google.common.base.Optional; + /** * Interface for objects that can provide {@link Sone}s by their ID. * @@ -27,12 +29,13 @@ import net.pterodactylus.sone.data.Sone; public interface SoneProvider { /** - * Returns the Sone with the given ID, if it exists. + * Returns the Sone with the given ID, or {@link Optional#absent()} if it + * does not exist. * * @param soneId * The ID of the Sone to return - * @return The Sone with the given ID, or {@code null} + * @return The Sone with the given ID, or {@link Optional#absent()} */ - public Sone getSone(String soneId); + public Optional getSone(String soneId); }