import net.pterodactylus.sone.data.Sone;
+import com.google.common.base.Optional;
+
/**
* Interface for objects that can provide {@link Sone}s by their ID.
*
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<Sone> getSone(String soneId);
}