Reuse trimmed_string from HTTP_HEADER_UTILITIES.

Added description to FITNESS_AND_QUALITY.
This commit is contained in:
jvelilla
2013-10-22 08:35:03 -03:00
parent 8c04a9183f
commit 2c2770b4f1
7 changed files with 11 additions and 21 deletions

View File

@@ -1,5 +1,5 @@
note
description: "Summary description for {FITNESS_AND_QUALITY}."
description: "FITNESS_AND_QUALITY. Object holding a fitness/quality values."
date: "$Date$"
revision: "$Revision$"
@@ -20,6 +20,7 @@ create
feature -- Initialization
make (a_fitness: INTEGER; a_quality: REAL_64)
-- Create an object with `a_fitness' and `a_quality'
do
fitness := a_fitness
quality := a_quality
@@ -27,6 +28,7 @@ feature -- Initialization
ensure
fitness_assigned : fitness = a_fitness
quality_assigned : quality = a_quality
entity_empty: entity.is_empty
end
feature -- Access

View File

@@ -7,6 +7,8 @@ class
HTTP_ACCEPT_LANGUAGE
inherit
HTTP_HEADER_UTILITIES
REFACTORING_HELPER
DEBUG_OUTPUT
@@ -222,16 +224,6 @@ feature {NONE} -- Implementation
end
end
feature {NONE} -- Helper
trimmed_string (s: READABLE_STRING_8): STRING_8
-- Copy of `s', where whitespace were stripped from the beginning and end of the string
do
create Result.make_from_string (s)
Result.left_adjust
Result.right_adjust
end
invariant
valid_quality: 0.0 <= quality and quality <= 1.0

View File

@@ -7,6 +7,8 @@ class
HTTP_ANY_ACCEPT
inherit
HTTP_HEADER_UTILITIES
REFACTORING_HELPER
DEBUG_OUTPUT
@@ -101,16 +103,6 @@ feature -- Status Report
create Result.make_from_string (value)
end
feature {NONE} -- Helper
trimmed_string (s: READABLE_STRING_8): STRING_8
-- Copy of `s', where whitespace were stripped from the beginning and end of the string
do
create Result.make_from_string (s)
Result.left_adjust
Result.right_adjust
end
note
copyright: "2011-2013, Javier Velilla, Jocelyn Fiat, Eiffel Software and others"
license: "Eiffel Forum License v2 (see http://www.eiffel.com/licensing/forum.txt)"

View File

@@ -24,6 +24,7 @@ create
feature -- Change
set_vary_header_value
-- <Precursor>
do
vary_header_value := {HTTP_HEADER_NAMES}.header_accept_charset -- "Accept-Charset"
end

View File

@@ -24,6 +24,7 @@ create
feature -- Change
set_vary_header_value
-- <Precursor>
do
vary_header_value := {HTTP_HEADER_NAMES}.header_accept_encoding -- "Accept-Encoding"
end

View File

@@ -23,6 +23,7 @@ create
feature -- Change
set_vary_header_value
-- <Precursor>
do
vary_header_value := {HTTP_HEADER_NAMES}.header_accept_language -- "Accept-Language"
end

View File

@@ -23,6 +23,7 @@ create
feature -- Change
set_vary_header_value
-- <Precursor>
do
vary_header_value := {HTTP_HEADER_NAMES}.header_accept -- "Accept"
end