1 21 package com.db4o.test.types; 22 23 import java.util.*; 24 25 public class TypedPublic extends RTest 26 { 27 public Boolean oBoolean; 28 public Boolean nBoolean; 29 public boolean sBoolean; 30 31 public Byte oByte; 32 public Byte nByte; 33 public byte sByte; 34 35 public Character oCharacter; 36 public Character nCharacter; 37 public char sChar; 38 39 public Double oDouble; 40 public Double nDouble; 41 public double sDouble; 42 43 public Float oFloat; 44 public Float nFloat; 45 public float sFloat; 46 47 public Integer oInteger; 48 public Integer nInteger; 49 public int sInteger; 50 51 public Long oLong; 52 public Long nLong; 53 public long sLong; 54 55 public Short oShort; 56 public Short nShort; 57 public short sShort; 58 59 public String oString; 60 public String nString; 61 62 public Date oDate; 63 public Date nDate; 64 65 public ObjectSimplePublic oObject; 66 public ObjectSimplePublic nObject; 67 68 public void set(int ver){ 69 if(ver == 1){ 70 oBoolean = new Boolean (true); 71 nBoolean = null; 72 sBoolean = false; 73 74 oByte = new Byte (Byte.MAX_VALUE); 75 nByte = null; 76 sByte = Byte.MIN_VALUE; 77 78 oCharacter = new Character ((char)(Character.MAX_VALUE - 1)); 79 nCharacter = null; 80 sChar = Character.MIN_VALUE; 81 82 oDouble = new Double (Double.MAX_VALUE - 1); 83 nDouble = null; 84 sDouble = Double.MIN_VALUE; 85 86 oFloat = new Float (Float.MAX_VALUE - 1); 87 nFloat = null; 88 sFloat = Float.MIN_VALUE; 89 90 oInteger = new Integer (Integer.MAX_VALUE - 1); 91 nInteger = null; 92 sInteger = Integer.MIN_VALUE; 93 94 oLong = new Long (Long.MAX_VALUE - 1); 95 nLong = null; 96 sLong = Long.MIN_VALUE; 97 98 oShort = new Short ((short)(Short.MAX_VALUE - 1)); 99 nShort = null; 100 sShort = Short.MIN_VALUE; 101 102 oString = "db4o rules"; 103 nString = null; 104 105 oDate = new GregorianCalendar(2000,0,1).getTime(); 106 nDate = null; 107 108 oObject = new ObjectSimplePublic("s1"); 109 nObject = null; 110 }else{ 111 oBoolean = new Boolean (false); 112 nBoolean = new Boolean (true); 113 sBoolean = true; 114 115 oByte = new Byte ((byte)0); 116 nByte = new Byte (Byte.MIN_VALUE); 117 sByte = Byte.MAX_VALUE; 118 119 oCharacter = new Character ((char)0); 120 nCharacter = new Character (Character.MIN_VALUE); 121 sChar = (char)(Character.MAX_VALUE - 1); 122 123 oDouble = new Double (0); 124 nDouble = new Double (Double.MIN_VALUE); 125 sDouble = Double.MAX_VALUE - 1; 126 127 oFloat = new Float (0); 128 nFloat = new Float (Float.MIN_VALUE); 129 sFloat = Float.MAX_VALUE - 1; 130 131 oInteger = new Integer (0); 132 nInteger = new Integer (Integer.MIN_VALUE); 133 sInteger = Integer.MAX_VALUE - 1; 134 135 oLong = new Long (0); 136 nLong = new Long (Long.MIN_VALUE); 137 sLong = Long.MAX_VALUE - 1; 138 139 oShort = new Short ((short)0); 140 nShort = new Short (Short.MIN_VALUE); 141 sShort = (short)(Short.MAX_VALUE - 1); 142 143 oString = "db4o rules of course"; 144 nString = "yeah"; 145 146 oDate = null; 147 nDate = new GregorianCalendar(2001,1,1).getTime(); 148 149 oObject = new ObjectSimplePublic("s2o"); 150 nObject = new ObjectSimplePublic("s2n"); 151 } 152 } 153 } 154 | Popular Tags |