Forums
New posts
Search forums
Members
Current visitors
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Forums
Archive
Archive
Java
cant find a pattern to fit neatly - how to make a large number of monsters?
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
[QUOTE="Thufir Hawat, post: 599716"] Lew Bloch wrote: [..] characteristics. Why did you select LinkedHashSet over LinkedHashMap? That's not really my question, though. I'm more interested in the use of "Hash" in a collection. A Hash is a sort of unique id for each instance? I believe it to be related to the toString() default method in that hashCode() is so similar: public int hashCode() Returns a hash code value for this enumeration value. The hash code is just this enumeration value's integer value. public String toString() Returns a string value corresponding to this enumeration value. "A map cannot contain duplicate keys" <[URL]http://java.sun.com/docs/books/tutorial/collections/interfaces/index.html[/URL]> That sounds like a Set, to me. Whether one is preferable (in J2ME or J2SE) over the other might be contentious (?), their common quality of "Hashness" is new and interesting to me... [/QUOTE]
Verification
Post reply
Forums
Archive
Archive
Java
cant find a pattern to fit neatly - how to make a large number of monsters?
Top