1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/src/test/java/org/apidesign/java4browser/Instance.java Sat Sep 15 22:12:49 2012 +0200
1.3 @@ -0,0 +1,37 @@
1.4 +/*
1.5 + * To change this template, choose Tools | Templates
1.6 + * and open the template in the editor.
1.7 + */
1.8 +package org.apidesign.java4browser;
1.9 +
1.10 +/**
1.11 + *
1.12 + * @author Jaroslav Tulach <jtulach@netbeans.org>
1.13 + */
1.14 +public class Instance {
1.15 + private int i;
1.16 + protected short s;
1.17 + public double d;
1.18 + private float f;
1.19 + protected byte b = (byte)131;
1.20 +
1.21 + public Instance(int i, double d) {
1.22 + this.i = i;
1.23 + this.d = d;
1.24 + }
1.25 +
1.26 + public byte getByte() {
1.27 + return b;
1.28 + }
1.29 +
1.30 + public void setByte(byte b) {
1.31 + this.b = b;
1.32 + }
1.33 +
1.34 + public static double magicOne() {
1.35 + Instance i = new Instance(10, 3.3d);
1.36 + i.setByte((byte)0x09);
1.37 +
1.38 + return (i.i - i.getByte()) * i.d;
1.39 + }
1.40 +}