projects
/
Sone.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
🔀 Merge branch “release-80”
[Sone.git]
/
src
/
main
/
java
/
net
/
pterodactylus
/
sone
/
data
/
impl
/
IdOnlySone.java
diff --git
a/src/main/java/net/pterodactylus/sone/data/impl/IdOnlySone.java
b/src/main/java/net/pterodactylus/sone/data/impl/IdOnlySone.java
index
0ef220b
..
e06e5a7
100644
(file)
--- a/
src/main/java/net/pterodactylus/sone/data/impl/IdOnlySone.java
+++ b/
src/main/java/net/pterodactylus/sone/data/impl/IdOnlySone.java
@@
-18,11
+18,11
@@
import net.pterodactylus.sone.freenet.wot.Identity;
import freenet.keys.FreenetURI;
import freenet.keys.FreenetURI;
+import com.google.common.base.Objects;
+
/**
* {@link Sone} implementation that only stores the ID of a Sone and returns
* {@code null}, {@code 0}, or empty collections where appropriate.
/**
* {@link Sone} implementation that only stores the ID of a Sone and returns
* {@code null}, {@code 0}, or empty collections where appropriate.
- *
- * @author <a href="mailto:bombe@pterodactylus.net">David ‘Bombe’ Roden</a>
*/
public class IdOnlySone implements Sone {
*/
public class IdOnlySone implements Sone {
@@
-182,8
+182,7
@@
public class IdOnlySone implements Sone {
}
@Override
}
@Override
- public Sone removeLikedPostId(String postId) {
- return this;
+ public void removeLikedPostId(String postId) {
}
@Override
}
@Override
@@
-207,8
+206,7
@@
public class IdOnlySone implements Sone {
}
@Override
}
@Override
- public Sone removeLikedReplyId(String replyId) {
- return this;
+ public void removeLikedReplyId(String replyId) {
}
@Override
}
@Override
@@
-240,4
+238,14
@@
public class IdOnlySone implements Sone {
return id;
}
return id;
}
+ @Override
+ public int hashCode() {
+ return id.hashCode();
+ }
+
+ @Override
+ public boolean equals(Object object) {
+ return (object != null) && (object.getClass() == getClass()) && Objects.equal(id, ((IdOnlySone) object).id);
+ }
+
}
}