2

I'm programming in Android Studio. I'm using the mapDB, 2.0-beta8 version. I have created my own class SingleCase, I also defined a static variable:

static ConcurrentNavigableMap<String, SingleCase > map;

after initialize the data base:

db = DBMaker.fileDB(newFile(dbName)).closeOnJvmShutdown().encryptionEnable(dbName).make();

I tried to load to my map variable from data base by using that code:

map = db.getTreeMap("collectionName");

Unfortunately it fails, and alerts that 'getTreeMap(java.lang.String)' is deprecated.

what other function can I use instead?

shahar
  • 31
  • 2

2 Answers2

1

You can use

treeMap("Aa").createOrOpen()  
Pritam Banerjee
  • 17,953
  • 10
  • 93
  • 108
Jan Kotek
  • 1,084
  • 7
  • 4
0

I would use createOrOpen(), but I'm new in MapDB, so this could be a wrong.

see docu

hiaclibe
  • 636
  • 9
  • 25