Home | History | Annotate | Download | only in testback
      1 package foo.bar.testback;
      2 
      3 public class Foo {
      4 
      5     private Object mValue;
      6 
      7     @Override
      8     public int hashCode() {
      9         final int prime = 31;
     10         int result = 1;
     11         result = prime * result + ((mValue == null) ? 0 : mValue.hashCode());
     12         return result;
     13     }
     14 
     15     @Override
     16     public boolean equals(Object obj) {
     17         if (this == obj)
     18             return true;
     19         if (obj == null)
     20             return false;
     21         if (getClass() != obj.getClass())
     22             return false;
     23         Foo other = (Foo) obj;
     24         if (mValue == null) {
     25             if (other.mValue != null)
     26                 return false;
     27         } else if (!mValue.equals(other.mValue))
     28             return false;
     29         return true;
     30     }
     31 
     32 
     33     private class Bar {
     34         protected void doSomething() {
     35 
     36         }
     37     }
     38 
     39     private class Baz extends Bar {
     40         @Override
     41         protected void doSomething() {
     42 
     43         }
     44     }
     45 }
     46