📄 settest.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.//// The original code and portions created by SMB are// Copyright (C) 1997-@year@ by SMB GmbH. All rights reserved.//// $Id$package test.ozoneDB.DxLib;import org.ozoneDB.DxLib.DxSet;import org.ozoneDB.DxLib.DxHashSet;import org.ozoneDB.DxLib.DxTreeSet;/** * * * @author <a href="http://www.softwarebuero.de/">SMB</a> * @version $Revision$Date$ */public class SetTest extends AbstractTest { public SetTest() { super("testDxSet"); } public SetTest(String name) { super(name); } public void testDxSet() throws Exception { Class[] setFactories = {DxHashSet.class, DxTreeSet.class}; // retainsAll for (int i = 0; i < setFactories.length; i++) { retainsAll((DxSet) setFactories[i].newInstance(), CollectionTest.newDxStrings()); } } /** */ public void retainsAll(DxSet set, Object[] objs) throws Exception { set.addAll(objs); DxSet set2 = (DxSet) set.clone(); startTimer(set.getClass().getName(), "retainsAll"); set.retainAll(set2); assertEquals(set, set2); assertTrue(set.count() > 0); set2.clear(); set.retainAll(set2); assertTrue(set.isEmpty()); stopTimer(); }}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -