mapusage.java
来自「Java的面向对象数据库系统的源代码」· Java 代码 · 共 31 行
JAVA
31 行
// 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 + =
减小字号Ctrl + -
显示快捷键?