1 21 package com.db4o.config; 22 23 import java.util.*; 24 25 import com.db4o.*; 26 27 31 public class TTreeMap implements ObjectConstructor { 32 33 public Object onStore(ObjectContainer con, Object object){ 34 return ((TreeMap)object).comparator(); 35 } 36 37 public void onActivate(ObjectContainer con, Object object, Object members){ 38 } 40 41 public Object onInstantiate(ObjectContainer container, Object storedObject){ 42 try{ 43 Comparator comp = (Comparator)storedObject; 44 if(comp != null){ 45 return new TreeMap(comp); 46 } 47 }catch(Exception e){} 48 return new TreeMap(); 49 } 50 51 public Class storedClass(){ 52 return Object .class; 53 } 54 } 55 | Popular Tags |