scala/ScalaBook/chapter-02/doccomment.scala

package Cell
/**  Package <code>Cell</code> defines class 
  *  <code>cell</code>. 
  */ 
/**  Class <code>cell</code> implements a simple 
  *  storage cell into which one can store numbers. 
  *  The class can be instantiated by either supplying 
  *  an initial value or by assuming its initial value 
  *  is  equal to zero.
  *
  *  @author Dimitrios-Georgios Syropoulos-Harissis
  *
  *  @version 1.0  
  */
class cell (protected var  contents : Int){
/** Creating a new instance of this class with no value
  * specified implies that the number 0 is to be stored
  * in the object. 
  */
  def this () = this(0)
/** Method <code>get</code> should be
  * used to retrieve the value currently
  * stored in the storage cell.
  *
  */
  def get() = contents
/** Method <code>set</code> should be 
  * used to alter the contents of the cell.
  * @param n The new value to be stored 
  * in this storage cell.
  */
  def set(n: Int) = {
    contents = n
  }
}