class Origin implements Serializable {

    @Override
    public int hashCode() {
        // explicitPortNotation is not taken into count
        if(SCHEME_HTTPS.equals(this.scheme) || SCHEME_HTTP.equals(this.scheme)){
            return Objects.hash(scheme, host, port);
        }
        else {
            return Objects.hash(scheme, schemeSpecificPart);
        }
    }

    @Deprecated public  Origin(String scheme, String host, int port);
    public  Origin(String originUrl);

}