Home | History | Annotate | Download | only in util

Lines Matching refs:reference

26      * Ensures that an object reference passed as a parameter to the calling
29 * @param reference an object reference
30 * @return the non-null reference that was validated
31 * @throws NullPointerException if {@code reference} is null
33 public static <T> T checkNotNull(T reference) {
34 if (reference == null) {
37 return reference;
41 * Ensures that an object reference passed as a parameter to the calling
44 * @param reference an object reference
47 * @return the non-null reference that was validated
48 * @throws NullPointerException if {@code reference} is null
50 public static <T> T checkNotNull(T reference, Object errorMessage) {
51 if (reference == null) {
54 return reference;