Add accessor for “seed” property.
authorDavid ‘Bombe’ Roden <bombe@freenetproject.org>
Tue, 24 Mar 2009 23:31:37 +0000 (00:31 +0100)
committerDavid ‘Bombe’ Roden <bombe@freenetproject.org>
Tue, 24 Mar 2009 23:31:37 +0000 (00:31 +0100)
src/net/pterodactylus/fcp/Peer.java

index 1fa13e3..aec2959 100644 (file)
@@ -92,6 +92,16 @@ public class Peer extends BaseMessage {
        }
 
        /**
+        * Returns whether this peer is a seed.
+        *
+        * @return <code>true</code> if the peer is a seed, <code>false</code>
+        *         otherwise
+        */
+       public boolean isSeed() {
+               return Boolean.valueOf(getField("seed"));
+       }
+
+       /**
         * Returns the “y” part of the peer’s public DSA key.
         *
         * @return The public DSA key