Lines Matching refs:reference
52 * Ensures that an string reference passed as a parameter to the calling
55 * @param string an string reference
56 * @return the string reference that was validated
67 * Ensures that an string reference passed as a parameter to the calling
70 * @param string an string reference
73 * @return the string reference that was validated
85 * Ensures that an object reference passed as a parameter to the calling
88 * @param reference an object reference
89 * @return the non-null reference that was validated
90 * @throws NullPointerException if {@code reference} is null
92 public static @NonNull <T> T checkNotNull(final T reference) {
93 if (reference == null) {
96 return reference;
100 * Ensures that an object reference passed as a parameter to the calling
103 * @param reference an object reference
106 * @return the non-null reference that was validated
107 * @throws NullPointerException if {@code reference} is null
109 public static @NonNull <T> T checkNotNull(final T reference, final Object errorMessage) {
110 if (reference == null) {
113 return reference;