Fix javadoc problems.
[xudocci.git] / src / main / java / net / pterodactylus / xdcc / data / Network.java
index 8fac0ea..b13df61 100644 (file)
 
 package net.pterodactylus.xdcc.data;
 
+import static com.google.common.base.Preconditions.checkNotNull;
+
 import java.util.Collection;
 
 import com.beust.jcommander.internal.Sets;
-import com.google.common.base.Objects;
 
 /**
  * Defines a network.
@@ -40,9 +41,11 @@ public class Network {
         *
         * @param name
         *              The name of the network
+        * @throws NullPointerException
+        *              if {@code name} is {@code null}
         */
-       private Network(String name) {
-               this.name = name;
+       private Network(String name) throws NullPointerException {
+               this.name = checkNotNull(name, "name must not be null");
        }
 
        //
@@ -85,10 +88,7 @@ public class Network {
                        return false;
                }
                Network network = (Network) object;
-               if (!Objects.equal(name(), network.name())) {
-                       return false;
-               }
-               return true;
+               return name().equals(network.name());
        }
 
        @Override