X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Fnet%2Fpterodactylus%2Fsone%2Fdata%2FSone.java;fp=src%2Fmain%2Fjava%2Fnet%2Fpterodactylus%2Fsone%2Fdata%2FSone.java;h=d5154242fdac8da2f6e2196af7153d4d17f34aed;hb=a7c7118b60516be41b759d4cc41d61e2bc074ebb;hp=ac6e41ae2c7c61c96c5cbec8f290ecd8a5726348;hpb=c3055539dfe69e19c28bae7f3ad167ddc7491118;p=Sone.git diff --git a/src/main/java/net/pterodactylus/sone/data/Sone.java b/src/main/java/net/pterodactylus/sone/data/Sone.java index ac6e41a..d515424 100644 --- a/src/main/java/net/pterodactylus/sone/data/Sone.java +++ b/src/main/java/net/pterodactylus/sone/data/Sone.java @@ -150,7 +150,7 @@ public class Sone implements Fingerprintable, Comparable { } }; - /** Filter that matches all {@link Core#isLocalSone(Sone) local Sones}. */ + /** Filter that matches all {@link Core#getLocalSones() local Sones}. */ public static final Filter LOCAL_SONE_FILTER = new Filter() { @Override @@ -175,6 +175,9 @@ public class Sone implements Fingerprintable, Comparable { /** The ID of this Sone. */ private final String id; + /** Whether this is a local Sone. */ + private final boolean local; + /** The identity of this Sone. */ private Identity identity; @@ -229,9 +232,12 @@ public class Sone implements Fingerprintable, Comparable { * * @param id * The ID of the Sone + * @param local + * {@code true} if this Sone is local, {@code false} otherwise */ - public Sone(String id) { + public Sone(String id, boolean local) { this.id = id; + this.local = local; } // @@ -275,6 +281,15 @@ public class Sone implements Fingerprintable, Comparable { } /** + * Returns whether this Sone is local. + * + * @return {@code true} if this Sone is local, {@code false} otherwise + */ + public boolean isLocal() { + return local; + } + + /** * Returns the name of this Sone. * * @return The name of this Sone