indexing
description: "Unified resource locators"
status: "See note at end of class"
date: "$Date$"
revision: "$Revision$"
deferred class interface
URL
feature
default_port: INTEGER
hash_code: INTEGER
HASHABLE
ensure HASHABLE
good_hash_value: Result >= 0
location: STRING
URL
port: INTEGER
proxy_host: STRING
require
proxy_supported: is_proxy_supported
has_proxy: is_proxy_used
ensure
result_not_empty: Result /= void and then not Result.is_empty
proxy_port: INTEGER
require
proxy_supported: is_proxy_supported
has_proxy: is_proxy_used
ensure
result_non_negative: Result >= 0
service: STRING
feature
has_username: BOOLEAN
is_correct: BOOLEAN
URL
is_hashable: BOOLEAN
HASHABLE
ensure HASHABLE
ok_if_not_default: Result implies (Current /= default)
is_password_accepted: BOOLEAN
is_proxy_supported: BOOLEAN
is_proxy_used: BOOLEAN
proxy_host_ok (host: STRING): BOOLEAN
require
proxy_supported: is_proxy_supported
feature
reset_proxy
require
proxy_supported: is_proxy_supported
ensure
no_proxy_set: not is_proxy_used
port_reset: proxy_port = 0
set_password (pw: STRING)
require
password_accepted: is_password_accepted
non_empty_password: pw /= void and then not pw.is_empty
set_port (port_no: INTEGER)
port_no
require
port_non_negative: port_no >= 0
ensure
port_set: port = port_no
set_proxy (host: STRING; port_no: INTEGER)
hostport_no
require
proxy_supported: is_proxy_supported
non_empty_host: host /= void and then not host.is_empty
host_valid: proxy_host_ok (host)
non_negative_port: port_no >= 0
ensure
host_set: proxy_host = host
port_set: proxy_port = port_no
set_proxy_information (pi: PROXY_INFORMATION)
pi
require
proxy_supported: is_proxy_supported
ensure
proxy_information_set: proxy_information = pi
set_username (un: STRING)
require
username_ok: has_username
non_empty_username: un /= void and then not un.is_empty
invariant
proxy_used_definition: is_proxy_used = (proxy_information /= void)
proxy_usage_constraint: is_proxy_used implies is_proxy_supported
ANY
reflexive_equality: standard_is_equal (Current)
reflexive_conformance: conforms_to (Current)
end -- URL