⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 mapusage.java

📁 Java的面向对象数据库系统的源代码
💻 JAVA
字号:
// You can redistribute this software and/or modify it under the terms of// the Ozone Library License version 1 published by ozone-db.org.//// This file is// Copyright (C) 2003-@year@ Per Nyfelt. All rights reserved.// $Id: $//package collections;import org.ozoneDB.collections.NodeTreeMapImplFactory;import java.util.Map;/** * @author Per Nyfelt */public class MapUsage {    public static void main(String[] args) throws Exception {        NodeTreeMapImplFactory.setDefaultDatabaseUrl("ozonedb:remote://localhost:3333");        Map map = NodeTreeMapImplFactory.getDefault().create();        map.put("key1", "value1");        map.put("key2", "value2");        System.out.println("key1 has value " + map.get("key1"));        NodeTreeMapImplFactory.getDefault().closeDatabase();        // another way is to set the db url to null        //NodeTreeMapImplFactory.setDefaultDatabaseUrl(null);    }}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -