lucene-java-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ehatc...@apache.org
Subject svn commit: r359537 - in /lucene/java/trunk/contrib/regex/src/java/org/apache/lucene/search/regex: JakartaRegexpCapabilities.java JavaUtilRegexCapabilities.java
Date Wed, 28 Dec 2005 14:25:37 GMT
Author: ehatcher
Date: Wed Dec 28 06:25:34 2005
New Revision: 359537

URL: http://svn.apache.org/viewcvs?rev=359537&view=rev
Log:
add .equals/.hashCode

Modified:
    lucene/java/trunk/contrib/regex/src/java/org/apache/lucene/search/regex/JakartaRegexpCapabilities.java
    lucene/java/trunk/contrib/regex/src/java/org/apache/lucene/search/regex/JavaUtilRegexCapabilities.java

Modified: lucene/java/trunk/contrib/regex/src/java/org/apache/lucene/search/regex/JakartaRegexpCapabilities.java
URL: http://svn.apache.org/viewcvs/lucene/java/trunk/contrib/regex/src/java/org/apache/lucene/search/regex/JakartaRegexpCapabilities.java?rev=359537&r1=359536&r2=359537&view=diff
==============================================================================
--- lucene/java/trunk/contrib/regex/src/java/org/apache/lucene/search/regex/JakartaRegexpCapabilities.java
(original)
+++ lucene/java/trunk/contrib/regex/src/java/org/apache/lucene/search/regex/JakartaRegexpCapabilities.java
Wed Dec 28 06:25:34 2005
@@ -18,4 +18,19 @@
     char[] prefix = RegexpTunnel.getPrefix(regexp);
     return prefix == null ? null : new String(prefix);
   }
+
+  public boolean equals(Object o) {
+    if (this == o) return true;
+    if (o == null || getClass() != o.getClass()) return false;
+
+    final JakartaRegexpCapabilities that = (JakartaRegexpCapabilities) o;
+
+    if (regexp != null ? !regexp.equals(that.regexp) : that.regexp != null) return false;
+
+    return true;
+  }
+
+  public int hashCode() {
+    return (regexp != null ? regexp.hashCode() : 0);
+  }
 }

Modified: lucene/java/trunk/contrib/regex/src/java/org/apache/lucene/search/regex/JavaUtilRegexCapabilities.java
URL: http://svn.apache.org/viewcvs/lucene/java/trunk/contrib/regex/src/java/org/apache/lucene/search/regex/JavaUtilRegexCapabilities.java?rev=359537&r1=359536&r2=359537&view=diff
==============================================================================
--- lucene/java/trunk/contrib/regex/src/java/org/apache/lucene/search/regex/JavaUtilRegexCapabilities.java
(original)
+++ lucene/java/trunk/contrib/regex/src/java/org/apache/lucene/search/regex/JavaUtilRegexCapabilities.java
Wed Dec 28 06:25:34 2005
@@ -16,4 +16,19 @@
   public String prefix() {
     return null;
   }
+
+  public boolean equals(Object o) {
+    if (this == o) return true;
+    if (o == null || getClass() != o.getClass()) return false;
+
+    final JavaUtilRegexCapabilities that = (JavaUtilRegexCapabilities) o;
+
+    if (pattern != null ? !pattern.equals(that.pattern) : that.pattern != null) return false;
+
+    return true;
+  }
+
+  public int hashCode() {
+    return (pattern != null ? pattern.hashCode() : 0);
+  }
 }



Mime
View raw message