Class DS_PAIR PreviousNext

note
description:

    "Cells containing two items"

library:    "Gobo Eiffel Structure Library"
author:     "Eric Bezault <ericb@gobosoft.com>"
copyright:  "Copyright (c) 1999, Eric Bezault and others"
license:    "MIT License"
class interface
DS_PAIR [G, H]
inherit
DS_CELL [G]
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
        -- First item of cell
        -- (From item is DS_CELL.)
second: H
        -- Second item of cell
feature -- Element change
put_first (v: G)
        -- Insert v in cell.
    ensure
        inserted: first = v
put_second (w: H)
        -- Insert w in cell.
    ensure
        inserted: second = w
end -- class DS_PAIR

Copyright © 1999, Eric Bezault
mailto:
ericb@gobosoft.com
http:
//www.gobosoft.com
Last Updated: 8 August 1999

HomeTocPreviousNext