class URL implements Serializable {

    @Override
    public boolean equals(Object obj) {
        if (this == obj) {
            return true;
        }
        if (obj == null) {
            return false;
        }
        if (getClass() != obj.getClass()) {
            return false;
        }
        URL other = (URL) obj;
        if (!StringUtils.isEquals(host, other.host)) {
            return false;
        }
        if (parameters == null) {
            if (other.parameters != null) {
                return false;
            }
        } else if (!parameters.keySet().equals(other.parameters.keySet())) {
            return false;
        } else {
            for (String key : parameters.keySet()) {
                if (key.equals(CommonConstants.TIMESTAMP_KEY)) {
                    continue;
                }
                if (!parameters.get(key).equals(other.parameters.get(key))) {
                    return false;
                }
            }
            return true;
        }

        if (!StringUtils.isEquals(password, other.password)) {
            return false;
        }
        if (!StringUtils.isEquals(path, other.path)) {
            return false;
        }
        if (port != other.port) {
            return false;
        }
        if (!StringUtils.isEquals(protocol, other.protocol)) {
            return false;
        }
        if (!StringUtils.isEquals(username, other.username)) {
            return false;
        }
        return true;
    }

    protected  URL();
    public  URL(String protocol, String host, int port);
    public  URL(String protocol, String host, int port, String[] pairs);
    public  URL(String protocol, String host, int port, Map<String, String> parameters);
    public  URL(String protocol, String host, int port, String path);
    public  URL(String protocol, String host, int port, String path, String... pairs);
    public  URL(String protocol, String host, int port, String path, Map<String, String> parameters);
    public  URL(String protocol, String username, String password, String host, int port, String path);
    public  URL(String protocol, String username, String password, String host, int port, String path, String... pairs);
    public  URL(String protocol,
               String username,
               String password,
               String host,
               int port,
               String path,
               Map<String, String> parameters);
    public  URL(String protocol,
               String username,
               String password,
               String host,
               int port,
               String path,
               Map<String, String> parameters,
               Map<String, Map<String, String>> methodParameters);

}