KickJava   Java API By Example, From Geeks To Geeks.

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


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 public class ArrayMixedTypedPublic extends RTest
25 {
26     public Object JavaDoc[] o1;
27     public Object JavaDoc[] o2;
28     public Object JavaDoc[] o3;
29     public Object JavaDoc[] o4;
30     public Object JavaDoc[] o5;
31     public Object JavaDoc[] o6;
32
33     public void set(int ver){
34         if(ver == 1){
35             o1 = new Boolean JavaDoc[]{new Boolean JavaDoc(true), new Boolean JavaDoc(false), null };
36             o2 = null;
37             o3 = new Byte JavaDoc[]{ new Byte JavaDoc(Byte.MAX_VALUE), new Byte JavaDoc(Byte.MIN_VALUE), new Byte JavaDoc((byte)0), null};
38             o4 = new Float JavaDoc[] {new Float JavaDoc(Float.MAX_VALUE - 1), new Float JavaDoc(Float.MIN_VALUE), new Float JavaDoc(0), null};
39             o5 = new String JavaDoc[] {"db4o rules", "cool", "supergreat"};
40             o6 = new Date[] {new GregorianCalendar(2000,0,1).getTime(), new GregorianCalendar(2000,0,1).getTime(), new GregorianCalendar(2001,11,31).getTime(), null};
41         }else{
42             o1 = new Date[] {new GregorianCalendar(2000,0,1).getTime(), new GregorianCalendar(2000,0,1).getTime(), new GregorianCalendar(2001,11,31).getTime(), null};
43             o2 = null;
44             o3 = new String JavaDoc[] {};
45             o4 = new Boolean JavaDoc[]{new Boolean JavaDoc(false), new Boolean JavaDoc(true), new Boolean JavaDoc(true)};
46             o5 = new Double JavaDoc[]{new Double JavaDoc(Double.MIN_VALUE), new Double JavaDoc(0)};
47             o6 = new Object JavaDoc[]{"ohje", new Double JavaDoc(Double.MIN_VALUE), new Float JavaDoc(4), null};
48         }
49     }
50 }
51
Popular Tags