[Spread-users] Spread Java interface patch repost (reposted w/license)

Leonard Richardson leonardr at collab.net
Thu Aug 23 11:02:41 EDT 2001


At Jonathan's request, I'm resending my original hashCode() patch with the
license for contributions prepended.

------------------------------------------------------------------

Copyright (C) 2001 CollabNet.

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
 
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE FOR
ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

------------------------------------------------------------------

--- orig/java/splib_src/GroupID.java	Fri Jun 22 10:57:50 2001
+++ java/splib_src/GroupID.java	Fri Aug 17 02:31:04 2001
@@ -104,6 +104,18 @@
 		return ID;
 	}

+	// Returns the hash code of the group ID.
+	///////////////////////////////////////////////////////////////////
+	/**
+	 * Returns the hash code of the group ID.
+	 *
+	 * @return int the hash code
+	 */
+	public int hashCode()
+	{
+		return ID.hashCode();
+	}
+
 	// Converts the group ID to a string.
 	/////////////////////////////////////
 	/**


--- orig/java/splib_src/SpreadGroup.java	Fri Jun 22 10:57:50 2001
+++ java/splib_src/SpreadGroup.java	Fri Aug 17 04:16:54 2001
@@ -237,4 +237,18 @@
 		///////////////////////////////////////////
 		return true;
 	}
+
+	// Returns the hash code of the group, which is defined as the
+	// hash code of its name.
+	///////////////////////////////////////////////////////////////////
+	/**
+	 * Returns the hash code of the group, which is defined as the
+	 * hash code of its name.
+	 *
+	 * @return int the hash code
+	 */
+	public int hashCode()
+	{
+		return toString().hashCode();
+	}
 }

-- 
Leonard Richardson  | CollabNet 
leonardr at collab.net | http://www.collab.net
"Duty now for the future"





More information about the Spread-users mailing list