diff org.eclipse.osgi/osgi/src/org/osgi/framework/Filter.d @ 105:bbe49769ec18

...
author Frank Benoit <benoit@tionex.de>
date Sun, 08 Nov 2009 12:42:30 +0100
parents 12b890a6392a
children
line wrap: on
line diff
--- a/org.eclipse.osgi/osgi/src/org/osgi/framework/Filter.d	Sat May 02 11:27:24 2009 +0200
+++ b/org.eclipse.osgi/osgi/src/org/osgi/framework/Filter.d	Sun Nov 08 12:42:30 2009 +0100
@@ -1,8 +1,8 @@
 /*
  * $Header: /cvshome/build/org.osgi.framework/src/org/osgi/framework/Filter.java,v 1.16 2007/02/21 16:49:05 hargrave Exp $
- * 
+ *
  * Copyright (c) OSGi Alliance (2000, 2007). All Rights Reserved.
- * 
+ *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
@@ -15,10 +15,14 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
+// Port to the D programming language:
+//     Frank Benoit <benoit@tionex.de>
 module org.osgi.framework.Filter;
-import org.osgi.framework.ServiceReference;
 
 import java.lang.all;
+
+import org.osgi.framework.ServiceReference; // packageimport
+
 import java.util.Dictionary;
 
 /**
@@ -32,14 +36,14 @@
  * <code>Filter</code> object.
  * <p>
  * Some examples of LDAP filters are:
- * 
+ *
  * <pre>
  *  &quot;(cn=Babs Jensen)&quot;
  *  &quot;(!(cn=Tim Howes))&quot;
  *  &quot;(&amp;(&quot; + Constants.OBJECTCLASS + &quot;=Person)(|(sn=Jensen)(cn=Babs J*)))&quot;
  *  &quot;(o=univ*of*mich*)&quot;
  * </pre>
- * 
+ *
  * @since 1.1
  * @see "Core Specification, section 5.5, for a description of the filter string
  *      syntax."
@@ -53,10 +57,10 @@
      * The filter is executed using the keys and values of the referenced
      * service's properties. The keys are case insensitively matched with the
      * filter.
-     * 
+     *
      * @param reference The reference to the service whose properties are used
      *        in the match.
-     * 
+     *
      * @return <code>true</code> if the service's properties match this
      *         filter; <code>false</code> otherwise.
      */
@@ -66,14 +70,14 @@
      * Filter using a <code>Dictionary</code> object. The Filter is executed
      * using the <code>Dictionary</code> object's keys and values. The keys
      * are case insensitively matched with the filter.
-     * 
+     *
      * @param dictionary The <code>Dictionary</code> object whose keys are
      *        used in the match.
-     * 
+     *
      * @return <code>true</code> if the <code>Dictionary</code> object's
      *         keys and values match this filter; <code>false</code>
      *         otherwise.
-     * 
+     *
      * @throws IllegalArgumentException If <code>dictionary</code> contains
      *         case variants of the same key name.
      */
@@ -84,43 +88,43 @@
      * <p>
      * The filter string is normalized by removing whitespace which does not
      * affect the meaning of the filter.
-     * 
+     *
      * @return Filter string.
      */
     public String toString();
 
     /**
      * Compares this <code>Filter</code> object to another object.
-     * 
+     *
      * @param obj The object to compare against this <code>Filter</code>
      *        object.
-     * 
+     *
      * @return If the other object is a <code>Filter</code> object, then
      *         returns <code>this.toString().equals(obj.toString()</code>;<code>false</code>
      *         otherwise.
      */
-    public bool equals(Object obj);
+    public equals_t opEquals(Object obj);
 
     /**
      * Returns the hashCode for this <code>Filter</code> object.
-     * 
+     *
      * @return The hashCode of the filter string; that is,
      *         <code>this.toString().hashCode()</code>.
      */
-    public int hashCode();
+    public hash_t toHash();
 
     /**
      * Filter with case sensitivity using a <code>Dictionary</code> object.
      * The Filter is executed using the <code>Dictionary</code> object's keys
      * and values. The keys are case sensitively matched with the filter.
-     * 
+     *
      * @param dictionary The <code>Dictionary</code> object whose keys are
      *        used in the match.
-     * 
+     *
      * @return <code>true</code> if the <code>Dictionary</code> object's
      *         keys and values match this filter; <code>false</code>
      *         otherwise.
-     * 
+     *
      * @since 1.3
      */
     public bool matchCase(Dictionary dictionary);