Search:

Type: Posts; User: Cornix

Search: Search took 0.09 seconds.

  1. Replies
    5
    Views
    1,279

    [SOLVED] Re: Collections.binarySearch returns wrong index

    Because the Object API clearly states that hashCode and equals must be synced (when equals returns true, hashCodes must be equal as well). If they are not the behavior of several standard classes is...
  2. Replies
    5
    Views
    1,279

    [SOLVED] Re: Collections.binarySearch returns wrong index

    I just want to point out, that this line:

    if ((p1.compareToXY(diagPoint) == 0) || (p1.compareToXY(diagPoint) == 0))
    does not look quite right since you are checking for the very same thing twice....
Results 1 to 2 of 2