1 package com.mockobjects.util; 2 3 38 public class Null { 39 44 public static final String DEFAULT_DESCRIPTION = "Null"; 45 46 53 public static final Null NULL = new Null(); 54 55 58 final private String myDescription; 59 60 65 public Null() { 66 this(DEFAULT_DESCRIPTION); 67 } 68 69 74 public Null(String description) { 75 super(); 76 myDescription = description; 77 } 78 79 85 public boolean equals(Object other) { 86 return other instanceof Null; 87 } 88 89 94 public int hashCode() { 95 return 0; 96 } 97 98 103 public String toString() { 104 return myDescription; 105 } 106 } 107 | Popular Tags |