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

Contents of /FreeELKS/trunk/library/structures/access/bag.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: 1289 byte(s)
Synchronized with ISE 6.0.65740
1 indexing
2
3 description: "[
4 Collections of items, where each item may occur zero
5 or more times, and the number of occurrences is meaningful.
6 ]"
7 legal: "See notice at end of class."
8
9 status: "See notice at end of class."
10 names: bag, access;
11 access: membership;
12 contents: generic;
13 date: "$Date$"
14 revision: "$Revision$"
15
16 deferred class BAG [G] inherit
17
18 COLLECTION [G]
19 redefine
20 extend
21 end
22
23 feature -- Measurement
24
25 occurrences (v: G): INTEGER is
26 -- Number of times `v' appears in structure
27 -- (Reference or object equality,
28 -- based on `object_comparison'.)
29 deferred
30 ensure
31 non_negative_occurrences: Result >= 0
32 end
33
34 feature -- Element change
35
36 extend (v: G) is
37 -- Add a new occurrence of `v'.
38 deferred
39 ensure then
40 one_more_occurrence: occurrences (v) = old (occurrences (v)) + 1
41 end
42
43 indexing
44 library: "EiffelBase: Library of reusable components for Eiffel."
45 copyright: "Copyright (c) 1984-2006, Eiffel Software and others"
46 license: "Eiffel Forum License v2 (see http://www.eiffel.com/licensing/forum.txt)"
47 source: "[
48 Eiffel Software
49 356 Storke Road, Goleta, CA 93117 USA
50 Telephone 805-685-1006, Fax 805-685-6869
51 Website http://www.eiffel.com
52 Customer support http://support.eiffel.com
53 ]"
54
55
56
57
58
59
60
61 end -- class BAG
62
63
64

Properties

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

  ViewVC Help
Powered by ViewVC 1.1.23