summaryrefslogtreecommitdiff
path: root/org/ietf
diff options
context:
space:
mode:
authorAudrius Meskauskas <audriusa@Bioinformatics.org>2005-10-20 08:42:36 +0000
committerAudrius Meskauskas <audriusa@Bioinformatics.org>2005-10-20 08:42:36 +0000
commit2a8f616a182e7b2aabf4a0b8ca84a3d92e00f430 (patch)
tree24fa3d4a145ea0b65ffe87942df7755823fdb938 /org/ietf
parent6e4e25df179684b4e876c41bfb1172c63f45e895 (diff)
downloadclasspath-2a8f616a182e7b2aabf4a0b8ca84a3d92e00f430.tar.gz
2005-10-20 Audrius Meskauskas <AudriusA@Bioinformatics.org>
* org/ietf/jgss/GSSCredential.java (hashCode), org/ietf/jgss/GSSName.java (hashCode): New declarations.
Diffstat (limited to 'org/ietf')
-rw-r--r--org/ietf/jgss/GSSCredential.java10
-rw-r--r--org/ietf/jgss/GSSName.java9
2 files changed, 19 insertions, 0 deletions
diff --git a/org/ietf/jgss/GSSCredential.java b/org/ietf/jgss/GSSCredential.java
index 724825d5e..bdf149710 100644
--- a/org/ietf/jgss/GSSCredential.java
+++ b/org/ietf/jgss/GSSCredential.java
@@ -331,4 +331,14 @@ public interface GSSCredential extends Cloneable
* @return True if this object equals the other.
*/
boolean equals(Object another);
+
+ /**
+ * Return the hash code of this credential. When overriding {@link #equals},
+ * it is necessary to override hashCode() as well.
+ *
+ * @return the hash code that must be the same for two credentials if
+ * {@link #equals} returns true.
+ */
+ int hashCode();
+
}
diff --git a/org/ietf/jgss/GSSName.java b/org/ietf/jgss/GSSName.java
index 5550697b5..ee3209dd0 100644
--- a/org/ietf/jgss/GSSName.java
+++ b/org/ietf/jgss/GSSName.java
@@ -201,6 +201,15 @@ public interface GSSName
boolean equals(Object another);
/**
+ * Return the hashcode of this GSSName. When overriding {@link #equals},
+ * it is normally necessary to override hashCode() as well.
+ *
+ * @return the hash code that must be the same for two names if {@link #equals}
+ * returns true.
+ */
+ int hashCode();
+
+ /**
* Creates a mechanism name (MN) from an arbitrary internal name. This
* is equivalent to using the factory methods {@link
* GSSManager#createName(java.lang.String,org.ietf.jgss.Oid,org.ietf.jgss.Oid)}