src/test/java/org/apidesign/java4browser/Instance.java
author Jaroslav Tulach <jaroslav.tulach@apidesign.org>
Sat, 15 Sep 2012 22:12:49 +0200
changeset 8 82772c96ec57
child 10 e84d9314f1bc
permissions -rw-r--r--
Few more instructions, but not all of them are well implemented
     1 /*
     2  * To change this template, choose Tools | Templates
     3  * and open the template in the editor.
     4  */
     5 package org.apidesign.java4browser;
     6 
     7 /**
     8  *
     9  * @author Jaroslav Tulach <jtulach@netbeans.org>
    10  */
    11 public class Instance {
    12     private int i;
    13     protected short s;
    14     public double d;
    15     private float f;
    16     protected byte b = (byte)131;
    17 
    18     public Instance(int i, double d) {
    19         this.i = i;
    20         this.d = d;
    21     }
    22     
    23     public byte getByte() {
    24         return b;
    25     }
    26     
    27     public void setByte(byte b) {
    28         this.b = b;
    29     }
    30     
    31     public static double magicOne() {
    32         Instance i = new Instance(10, 3.3d);
    33         i.setByte((byte)0x09);
    34         
    35         return (i.i - i.getByte()) * i.d;
    36     }
    37 }