/*
- * Sone - PostImpl.java - Copyright © 2010–2013 David Roden
+ * Sone - MemoryPost.java - Copyright © 2010–2016 David Roden
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
package net.pterodactylus.sone.database.memory;
+import static com.google.common.base.Optional.fromNullable;
+
import java.util.UUID;
import net.pterodactylus.sone.data.Post;
*/
@Override
public Sone getSone() {
- return soneProvider.getSone(soneId).get();
+ return soneProvider.getSone(soneId);
}
/**
*/
@Override
public Optional<String> getRecipientId() {
- return Optional.fromNullable(recipientId);
+ return fromNullable(recipientId);
}
/**
*/
@Override
public Optional<Sone> getRecipient() {
- return soneProvider.getSone(recipientId);
+ return fromNullable(soneProvider.getSone(recipientId));
}
/**