jdk/src/java.base/share/classes/java/time/temporal/ValueRange.java
changeset 44702 df9a5567603a
parent 25859 3317bb8137f4
equal deleted inserted replaced
44701:73cb7afafdff 44702:df9a5567603a
   383         if (obj == this) {
   383         if (obj == this) {
   384             return true;
   384             return true;
   385         }
   385         }
   386         if (obj instanceof ValueRange) {
   386         if (obj instanceof ValueRange) {
   387             ValueRange other = (ValueRange) obj;
   387             ValueRange other = (ValueRange) obj;
   388            return minSmallest == other.minSmallest && minLargest == other.minLargest &&
   388             return minSmallest == other.minSmallest && minLargest == other.minLargest &&
   389                    maxSmallest == other.maxSmallest && maxLargest == other.maxLargest;
   389                    maxSmallest == other.maxSmallest && maxLargest == other.maxLargest;
   390         }
   390         }
   391         return false;
   391         return false;
   392     }
   392     }
   393 
   393 
   396      *
   396      *
   397      * @return a suitable hash code
   397      * @return a suitable hash code
   398      */
   398      */
   399     @Override
   399     @Override
   400     public int hashCode() {
   400     public int hashCode() {
   401         long hash = minSmallest + minLargest << 16 + minLargest >> 48 + maxSmallest << 32 +
   401         long hash = minSmallest + (minLargest << 16) + (minLargest >> 48) +
   402             maxSmallest >> 32 + maxLargest << 48 + maxLargest >> 16;
   402                 (maxSmallest << 32) + (maxSmallest >> 32) + (maxLargest << 48) +
       
   403                 (maxLargest >> 16);
   403         return (int) (hash ^ (hash >>> 32));
   404         return (int) (hash ^ (hash >>> 32));
   404     }
   405     }
   405 
   406 
   406     //-----------------------------------------------------------------------
   407     //-----------------------------------------------------------------------
   407     /**
   408     /**