package com.gmail.alexellingsen.namelesswol.utils;

import com.gmail.alexellingsen.namelesswol.devices.Device;

import java.net.InetAddress;

public class ValidateUtils {

    public static boolean validateHost(String host) {
        try {
            InetAddress.getByName(host);
        } catch (Throwable t) {
            return false;
        }
        return true;
    }

    public static boolean validateMAC(final String mac) {
        try {
            Device.validateMac(mac);
            return true;
        } catch (IllegalArgumentException e) {
            return false;
        }
    }

    public static boolean validatePort(int port) {
        return port >= 1 && port <= 65535;
    }

}
@@ -139,37 +139,338 @@
 s;%0A%0A
-public class ValidateUtils %7B%0A
+/**%0A * Collection of validation methods.%0A */%0Apublic class ValidateUtils %7B%0A%0A    /**%0A     * Validates given host address by trying to parse it to a %7B@link java.net.InetAddress%7D.%0A     *%0A     * @param host The host address to validate.%0A     * @return Returns %7B@code true%7D if the host address is valid, %7B@code false%7D otherwise.%0A     */
 %0A   
@@ -663,32 +663,228 @@
 rn true;%0A    %7D%0A%0A
+    /**%0A     * Validates given MAC address.%0A     *%0A     * @param mac The MAC address to validate.%0A     * @return Returns %7B@code true%7D if the MAC address is valid, %7B@code false%7D otherwise.%0A     */%0A
     public stati
@@ -1087,24 +1087,245 @@
    %7D%0A    %7D%0A%0A
+    /**%0A     * Validates given port number, checking if it's too low or too high.%0A     *%0A     * @param port The port to validate.%0A     * @return Returns %7B@code true%7D if the port is valid, %7B@code false%7D otherwise.%0A     */%0A
     public s
@@ -1416,6 +1416,6 @@
   %7D%0A
-%0A
 %7D
+%0A

Add JavaDoc to ValidateUtils