KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > db4o > test > types > ArrayMixedInObjectPublic


1 /* Copyright (C) 2004 - 2006 db4objects Inc. http://www.db4o.com
2
3 This file is part of the db4o open source object database.
4
5 db4o is free software; you can redistribute it and/or modify it under
6 the terms of version 2 of the GNU General Public License as published
7 by the Free Software Foundation and as clarified by db4objects' GPL
8 interpretation policy, available at
9 http://www.db4o.com/about/company/legalpolicies/gplinterpretation/
10 Alternatively you can write to db4objects, Inc., 1900 S Norfolk Street,
11 Suite 350, San Mateo, CA 94403, USA.
12
13 db4o is distributed in the hope that it will be useful, but WITHOUT ANY
14 WARRANTY; without even the implied warranty of MERCHANTABILITY or
15 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
16 for more details.
17
18 You should have received a copy of the GNU General Public License along
19 with this program; if not, write to the Free Software Foundation, Inc.,
20 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */

21 package com.db4o.test.types;
22
23 import java.util.*;
24
25 public class ArrayMixedInObjectPublic extends RTest
26 {
27     public Object JavaDoc o1;
28     public Object JavaDoc o2;
29     public Object JavaDoc o3;
30     public Object JavaDoc o4;
31     public Object JavaDoc o5;
32     public Object JavaDoc o6;
33
34     public void set(int ver){
35         if(ver == 1){
36             o1 = new Boolean JavaDoc[]{new Boolean JavaDoc(true), new Boolean JavaDoc(false), null };
37             o2 = null;
38             o3 = new Byte JavaDoc[]{ new Byte JavaDoc(Byte.MAX_VALUE), new Byte JavaDoc(Byte.MIN_VALUE), new Byte JavaDoc((byte)0), null};
39             o4 = new Float JavaDoc[] {new Float JavaDoc(Float.MAX_VALUE - 1), new Float JavaDoc(Float.MIN_VALUE), new Float JavaDoc(0), null};
40             o5 = new String JavaDoc[] {"db4o rules", "cool", "supergreat"};
41             o6 = new Date[] {new GregorianCalendar(2000,0,1).getTime(), new GregorianCalendar(2000,0,1).getTime(), new GregorianCalendar(2001,11,31).getTime(), null};
42         }else{
43             o1 = new Date[] {new GregorianCalendar(2000,0,1).getTime(), new GregorianCalendar(2000,0,1).getTime(), new GregorianCalendar(2001,11,31).getTime(), null};
44             o2 = null;
45             o3 = new String JavaDoc[] {};
46             o4 = new Boolean JavaDoc[]{new Boolean JavaDoc(false), new Boolean JavaDoc(true), new Boolean JavaDoc(true)};
47             o5 = new Double JavaDoc[]{new Double JavaDoc(Double.MIN_VALUE), new Double JavaDoc(0)};
48             o6 = new Object JavaDoc[]{"ohje", new Double JavaDoc(Double.MIN_VALUE), new Float JavaDoc(4), null};
49         }
50
51     }
52 }
53
Popular Tags