📄 ozoneodmgdset.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-2000 by SMB GmbH. All rights reserved.//// $Id: OzoneODMGDSet.java,v 1.4 2000/10/28 16:55:19 daniela Exp $package org.ozoneDB.odmg;import org.odmg.*;//import org.ozoneDB.*;import java.util.*;/** * @author <a href="http://www.softwarebuero.de/">SMB</a> * @version $Revision: 1.4 $Date: 2000/10/28 16:55:19 $ */public class OzoneODMGDSet extends HashSet implements DSet { public OzoneODMGDSet() { super(); } public OzoneODMGDSet( Collection _collection ) { super( _collection ); } /** * Create a new <code>DSet</code> object that is the set union of this * <code>DSet</code> object and the set referenced by <code>otherSet</code>. * @param otherSet The other set to be used in the union operation. * @return A newly created <code>DSet</code> instance that contains the union of the two sets. */ public DSet union( DSet otherSet ) { DSet result = new OzoneODMGDSet( this ); result.addAll( otherSet ); return result; } /** * Create a new <code>DSet</code> object that is the set intersection of this * <code>DSet</code> object and the set referenced by <code>otherSet</code>. * @param otherSet The other set to be used in the intersection operation. * @return A newly created <code>DSet</code> instance that contains the * intersection of the two sets. */ public DSet intersection( DSet otherSet ) { DSet result = new OzoneODMGDSet( this ); result.retainAll( otherSet ); return result; } /** * Create a new <code>DSet</code> object that contains the elements of this * collection minus the elements in <code>otherSet</code>. * @param otherSet A set containing elements that should not be in the result set. * @return A newly created <code>DSet</code> instance that contains the elements * of this set minus those elements in <code>otherSet</code>. */ public DSet difference( DSet otherSet ) { DSet result = new OzoneODMGDSet( this ); result.removeAll( otherSet ); return result; } /** * Determine whether this set is a subset of the set referenced by <code>otherSet</code>. * @param otherSet Another set. * @return True if this set is a subset of the set referenced by <code>otherSet</code>, * otherwise false. */ public boolean subsetOf( DSet otherSet ) { return otherSet.containsAll( this ); } /** * Determine whether this set is a proper subset of the set referenced by * <code>otherSet</code>. * @param otherSet Another set. * @return True if this set is a proper subset of the set referenced by * <code>otherSet</code>, otherwise false. */ public boolean properSubsetOf( DSet otherSet ) { // because of Sets never have duplicate members this is true return this.size() == otherSet.size() && subsetOf( otherSet ); } /** * Determine whether this set is a superset of the set referenced by <code>otherSet</code>. * @param otherSet Another set. * @return True if this set is a superset of the set referenced by <code>otherSet</code>, * otherwise false. */ public boolean supersetOf( DSet otherSet ) { return this.containsAll( otherSet ); } /** * Determine whether this set is a proper superset of the set referenced by * <code>otherSet</code>. * @param otherSet Another set. * @return True if this set is a proper superset of the set referenced by * <code>otherSet</code>, otherwise false. */ public boolean properSupersetOf( DSet otherSet ) { // because of Sets never have duplicate members this is true return this.size() == otherSet.size() && supersetOf( otherSet ); } /** * NOT SUPPORTED! */ public Object selectElement( String predicate ) throws QueryInvalidException { throw new NotImplementedException( "OQL not supported" ); } /** * NOT SUPPORTED! */ public java.util.Iterator select( String predicate ) throws QueryInvalidException { throw new NotImplementedException( "OQL not supported" ); } /** * NOT SUPPORTED! */ public DCollection query( String predicate ) throws QueryInvalidException { throw new NotImplementedException( "OQL not supported" ); } /** * NOT SUPPORTED! */ public boolean existsElement( String predicate ) throws QueryInvalidException { throw new NotImplementedException( "OQL not supported" ); } }
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -