Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 2 of 2

Thread: Hash Key Comparisions for two objects

  1. #1
    Junior Member
    Join Date
    Apr 2014
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Post Hash Key Comparisions for two objects

    Hi,

    Please Help..

    I want to generate a Hash key for a [ Nested Hierarchical nodes].
    Can you suggest me a lightweight non-cryptographic hash map functions which generate a key, so that I can use this hashkey to comparison purposes.

    NOTE: Security is not a concern for me, I just want to create a Unique ID.

    I appreciate the help.

    Thanks


  2. #2
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,140
    Thanks
    65
    Thanked 2,720 Times in 2,670 Posts

    Default Re: Hash Key Comparisions for two objects

    What kind of objects are the hash keys for? If you want each new object to have a unique key, create the key by using a static int that is incremented for each object created.
    use this hashkey to comparison purposes.
    What types of objects would be expected to have the same key values?
    If you don't understand my answer, don't ignore it, ask a question.

Similar Threads

  1. Replies: 1
    Last Post: April 3rd, 2014, 02:11 PM
  2. [SOLVED] Get a new key in HashMap with values of another key.
    By Purple01 in forum What's Wrong With My Code?
    Replies: 8
    Last Post: September 21st, 2012, 04:33 AM
  3. [SOLVED] Creating new objects per key event
    By sp11k3t3ht3rd in forum Java Theory & Questions
    Replies: 2
    Last Post: October 12th, 2011, 09:46 AM
  4. [SOLVED] restricting a particular key stroke or key code
    By chronoz13 in forum AWT / Java Swing
    Replies: 2
    Last Post: April 22nd, 2011, 11:19 AM

Tags for this Thread