/[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 91424 - (show annotations)
Tue Oct 26 18:39:32 2004 UTC (15 years, 2 months ago) by manus_eiffel
File size: 1869 byte(s)
Initial revision

1 indexing
2
3 description:
4 "Tables whose keys are integers in a contiguous interval"
5
6 status: "See notice at end of class"
7 names: indexable, access;
8 access: index, membership;
9 contents: generic;
10 date: "$Date$"
11 revision: "$Revision$"
12
13 deferred class INDEXABLE [G, H -> INTEGER] inherit
14
15 TABLE [G, H]
16 rename
17 valid_key as valid_index
18 redefine
19 put, valid_index
20 end
21
22 feature -- Measurement
23
24 index_set: INTEGER_INTERVAL is
25 -- Range of acceptable indexes
26 deferred
27 ensure
28 not_void: Result /= Void
29 end
30
31 feature -- Status report
32
33 valid_index (i: H): BOOLEAN is
34 -- Is `i' a valid index?
35 deferred
36 ensure then
37 only_if_in_index_set:
38 Result implies
39 ((i >= index_set.lower) and
40 (i <= index_set.upper))
41 end
42
43 feature -- Element change
44
45 put (v: G; k: H) is
46 -- Associate value `v' with key `k'.
47 deferred
48 ensure then
49 insertion_done: item (k) = v
50 end
51
52 invariant
53
54 index_set_not_void: index_set /= Void
55
56 indexing
57
58 library: "[
59 EiffelBase: Library of reusable components for Eiffel.
60 ]"
61
62 status: "[
63 Copyright 1986-2001 Interactive Software Engineering (ISE).
64 For ISE customers the original versions are an ISE product
65 covered by the ISE Eiffel license and support agreements.
66 ]"
67
68 license: "[
69 EiffelBase may now be used by anyone as FREE SOFTWARE to
70 develop any product, public-domain or commercial, without
71 payment to ISE, under the terms of the ISE Free Eiffel Library
72 License (IFELL) at http://eiffel.com/products/base/license.html.
73 ]"
74
75 source: "[
76 Interactive Software Engineering Inc.
77 ISE Building
78 360 Storke Road, Goleta, CA 93117 USA
79 Telephone 805-685-1006, Fax 805-685-6869
80 Electronic mail <info@eiffel.com>
81 Customer support http://support.eiffel.com
82 ]"
83
84 info: "[
85 For latest info see award-winning pages: http://eiffel.com
86 ]"
87
88 end -- class INDEXABLE
89
90
91

Properties

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

  ViewVC Help
Powered by ViewVC 1.1.23