/[eiffelstudio]/FreeELKS/trunk/library/structures/access/indexable.e
ViewVC logotype

Contents of /FreeELKS/trunk/library/structures/access/indexable.e

Parent Directory Parent Directory | Revision Log Revision Log


Revision 91477 - (show annotations)
Sun Jan 14 09:47:13 2007 UTC (13 years ago) by ericb
File size: 1455 byte(s)
Synchronized with ISE 6.0.65740
1 indexing
2
3 description:
4 "Tables whose keys are integers in a contiguous interval"
5 legal: "See notice at end of class."
6
7 status: "See notice at end of class."
8 names: indexable, access;
9 access: index, membership;
10 contents: generic;
11 date: "$Date$"
12 revision: "$Revision$"
13
14 deferred class INDEXABLE [G, H -> INTEGER] inherit
15
16 TABLE [G, H]
17 rename
18 valid_key as valid_index
19 redefine
20 put, valid_index
21 end
22
23 feature -- Measurement
24
25 index_set: INTEGER_INTERVAL is
26 -- Range of acceptable indexes
27 deferred
28 ensure
29 not_void: Result /= Void
30 end
31
32 feature -- Status report
33
34 valid_index (i: H): BOOLEAN is
35 -- Is `i' a valid index?
36 deferred
37 ensure then
38 only_if_in_index_set:
39 Result implies
40 ((i >= index_set.lower) and
41 (i <= index_set.upper))
42 end
43
44 feature -- Element change
45
46 put (v: G; k: H) is
47 -- Associate value `v' with key `k'.
48 deferred
49 ensure then
50 insertion_done: item (k) = v
51 end
52
53 invariant
54
55 index_set_not_void: index_set /= Void
56
57 indexing
58 library: "EiffelBase: Library of reusable components for Eiffel."
59 copyright: "Copyright (c) 1984-2006, Eiffel Software and others"
60 license: "Eiffel Forum License v2 (see http://www.eiffel.com/licensing/forum.txt)"
61 source: "[
62 Eiffel Software
63 356 Storke Road, Goleta, CA 93117 USA
64 Telephone 805-685-1006, Fax 805-685-6869
65 Website http://www.eiffel.com
66 Customer support http://support.eiffel.com
67 ]"
68
69
70
71
72
73
74
75 end -- class INDEXABLE
76
77
78

Properties

Name Value
svn:eol-style native
svn:keywords Author Date Id Revision

  ViewVC Help
Powered by ViewVC 1.1.23