Advertisement
Guest User

Untitled

a guest
Jun 19th, 2017
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 5 0.37 KB | None | 0 0
  1. private static class NullType extends Type {
  2.  
  3.         public NullType() {
  4.             super("Bez typu");
  5.         }
  6.        
  7.         @Override
  8.         public int hashCode() {
  9.             return 1;
  10.         }
  11.  
  12.         @Override
  13.         public boolean equals(Object obj) {
  14.             if (this == obj)
  15.                 return true;
  16.             if (obj == null)
  17.                 return false;
  18.             if (obj instanceof NullType)
  19.                 return true;
  20.            
  21.             return false;
  22.         }
  23.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement