Lines Matching refs:reference
55 * Ensures that an string reference passed as a parameter to the calling
58 * @param string an string reference
59 * @return the string reference that was validated
70 * Ensures that an string reference passed as a parameter to the calling
73 * @param string an string reference
76 * @return the string reference that was validated
88 * Ensures that an object reference passed as a parameter to the calling
91 * @param reference an object reference
92 * @return the non-null reference that was validated
93 * @throws NullPointerException if {@code reference} is null
95 public static @NonNull <T> T checkNotNull(final T reference) {
96 if (reference == null) {
99 return reference;
103 * Ensures that an object reference passed as a parameter to the calling
106 * @param reference an object reference
109 * @return the non-null reference that was validated
110 * @throws NullPointerException if {@code reference} is null
112 public static @NonNull <T> T checkNotNull(final T reference, final Object errorMessage) {
113 if (reference == null) {
116 return reference;