Lines Matching refs:reference
69 * Ensures that an string reference passed as a parameter to the calling
72 * @param string an string reference
73 * @return the string reference that was validated
84 * Ensures that an string reference passed as a parameter to the calling
87 * @param string an string reference
90 * @return the string reference that was validated
102 * Ensures that an object reference passed as a parameter to the calling
105 * @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) {
110 if (reference == null) {
113 return reference;
117 * Ensures that an object reference passed as a parameter to the calling
120 * @param reference an object reference
123 * @return the non-null reference that was validated
124 * @throws NullPointerException if {@code reference} is null
126 public static @NonNull <T> T checkNotNull(final T reference, final Object errorMessage) {
127 if (reference == null) {
130 return reference;
134 * Ensures that an object reference passed as a parameter to the calling
137 * @param reference an object reference
141 * @return the non-null reference that was validated
142 * @throws NullPointerException if {@code reference} is null
144 public static @NonNull <T> T checkNotNull(final T reference,
147 if (reference == null) {
150 return reference;