samples/effectivelist/src/org/apidesign/effectivelist/Listable.scala
author Jaroslav Tulach <jtulach@netbeans.org>
Sun, 02 Sep 2012 22:00:13 +0200
changeset 403 ebe08056c60c
parent 402 e25dbfce40e9
child 405 87bcc647df63
permissions -rw-r--r--
Identifying code snippets to be used on my blog
     1 package org.apidesign.effectivelist
     2 
     3 /** A member of a {@link List} that makes keeping references
     4  * to previous and next items in the list effective.
     5  */
     6 // BEGIN: effectivelist.item
     7 trait Listable[T <: Listable[T]] {
     8   private[effectivelist] var prev : T = _
     9   private[effectivelist] var next : T = _
    10 }
    11 // END: effectivelist.item