Eiffel Media API
Overview Cluster Class Classes Index      Previous Next      Top Features

structure.support

Class DS_PAIR


Direct ancestors

DS_CELL

Creation

Features

Invariants

indexing

description

Cells containing two items

library

Gobo Eiffel Structure Library

copyright

Copyright (c) 1999, Eric Bezault and others

license

Eiffel Forum License v2 (see forum.txt)

date

$Date: 2005/07/13 17:54:23 $

revision

$Revision: 1.7 $

class

DS_PAIR [G, H]

inherit

DS_CELL

create

make (v: G; w: H)

-- Create a new cell containing v and w.

ensure
first_set: first = v
second_set: second = w

feature -- Access

first: G

-- Content of cell

-- (From DS_CELL)

second: H

-- Second item of cell

feature -- Element change

put_first (v: G)

-- Insert v in cell.

-- (From DS_CELL)

ensure
inserted: item = v
put_second (w: H)

-- Insert w in cell.

ensure
inserted: second = w

invariant


-- From ANY
reflexive_equality: standard_is_equal (Current)
reflexive_conformance: conforms_to (Current)

end