Class DS_LINKABLE |

    indexing

>     description:

>         "Linkable cells with a reference to their right neighbor"

>     library:    "Gobo Eiffel Structure Library"
>     author:     "Eric Bezault <ericb@gobosoft.com>"
>     copyright:  "Copyright (c) 1999, Eric Bezault and others"
>     license:    "Eiffel Forum License v2 (see forum.txt)"

    class interface

>     DS_LINKABLE [G]

    inherit

>     DS_CELL [G]

    creation

>     make (v: G)
>             -- Insert v in cell.
>             -- (From DS_CELL.)
>         ensure
>             inserted: item = v

    feature -- Access

>     item: G
>             -- Content of cell
>             -- (From DS_CELL.)

>     right: like Current
>             -- Right neighbor

    feature -- Element change

>     put, make (v: G)
>             -- Insert v in cell.
>             -- (From DS_CELL.)
>         ensure
>             inserted: item = v

>     put_right (other: like Current)
>             -- Put other to right of cell.
>         require
>             other_not_void: other /= Void
>         ensure
>             linked: right = other

>     forget_right
>             -- Remove right neighbor.
>         ensure
>             forgotten: right = Void

    end -- class DS_LINKABLE