Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on Jul 14th, 2011  |  syntax: None  |  size: 0.39 KB  |  views: 36  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1.     @Override
  2.     public int hashCode() {
  3.  
  4.         final int prime = 31;
  5.         int result = 1;
  6.        
  7.         result = prime * result + ((this.a == null) ? 0 : this.a.hashCode());
  8.         result = prime * result + this.i;
  9.         return result;
  10.     }
  11.  
  12.     @Override
  13.     public int hashCode() {
  14.  
  15.         return new HashCodeBuilder().append(this.a).append(this.i).toHashCode();
  16.     }
clone this paste RAW Paste Data