KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > BarImpl


1
2 import org.ozoneDB.OzoneObject;
3
4 /**
5  * $Id: BarImpl.java,v 1.1 2003/04/17 09:36:08 per_nyfelt Exp $
6  */

7 public class BarImpl extends OzoneObject implements Bar {
8
9     private int cVal;
10
11     /**
12      *
13      * @param cVal
14      * @throws Exception when the value 23 is supplied
15      */

16     public void setC(int cVal) throws Exception JavaDoc {
17         if (cVal == 23) {
18             throw new Exception JavaDoc("illegal value");
19         }
20         this.cVal = cVal;
21     }
22
23     public int getC() {
24         return cVal;
25     }
26 }
27
Popular Tags