projects
/
Sone.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Store locality of a Sone in the Sone itself.
[Sone.git]
/
src
/
main
/
java
/
net
/
pterodactylus
/
sone
/
data
/
Sone.java
diff --git
a/src/main/java/net/pterodactylus/sone/data/Sone.java
b/src/main/java/net/pterodactylus/sone/data/Sone.java
index
99d65ec
..
3923f66
100644
(file)
--- a/
src/main/java/net/pterodactylus/sone/data/Sone.java
+++ b/
src/main/java/net/pterodactylus/sone/data/Sone.java
@@
-175,6
+175,9
@@
public class Sone implements Fingerprintable, Comparable<Sone> {
/** The ID of this Sone. */
private final String id;
/** The ID of this Sone. */
private final String id;
+ /** Whether the Sone is local. */
+ private final boolean local;
+
/** The identity of this Sone. */
private Identity identity;
/** The identity of this Sone. */
private Identity identity;
@@
-229,9
+232,13
@@
public class Sone implements Fingerprintable, Comparable<Sone> {
*
* @param id
* The ID of the Sone
*
* @param id
* The ID of the Sone
+ * @param local
+ * {@code true} if the Sone is a local Sone, {@code false}
+ * otherwise
*/
*/
- public Sone(String id) {
+ public Sone(String id
, boolean local
) {
this.id = id;
this.id = id;
+ this.local = local;
}
//
}
//
@@
-284,6
+291,16
@@
public class Sone implements Fingerprintable, Comparable<Sone> {
}
/**
}
/**
+ * Returns whether this Sone is a local Sone.
+ *
+ * @return {@code true} if this Sone is a local Sone, {@code false}
+ * otherwise
+ */
+ public boolean isLocal() {
+ return local;
+ }
+
+ /**
* Returns the request URI of this Sone.
*
* @return The request URI of this Sone
* Returns the request URI of this Sone.
*
* @return The request URI of this Sone