Skip to content

Commit 7440131

Browse files
committed
docs:fix errors in documentation.
1 parent 9a6d3fc commit 7440131

File tree

1 file changed

+64
-33
lines changed

1 file changed

+64
-33
lines changed

google-cloud-spanner/src/main/java/com/google/cloud/spanner/StructReader.java

Lines changed: 64 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -52,21 +52,21 @@
5252
*/
5353
public interface StructReader {
5454
/**
55-
* Returns the type of the underlying data. This will always be a {@code STRUCT} type, with fields
55+
* @return the type of the underlying data. This will always be a {@code STRUCT} type, with fields
5656
* corresponding to the data's columns. For the result of a read or query, this will always match
5757
* the columns passed to the {@code read()} call or named in the query text, in order.
5858
*/
5959
Type getType();
6060

6161
/**
62-
* Returns the number of columns in the underlying data. This includes any columns with {@code
62+
* @return the number of columns in the underlying data. This includes any columns with {@code
6363
* NULL} values.
6464
*/
6565
int getColumnCount();
6666

6767
/**
68-
* Returns the index of the column named {@code columnName}.
69-
*
68+
* @param columnName
69+
* @return the index of the column named {@code columnName}.
7070
* @throws IllegalArgumentException if there is not exactly one element of {@code
7171
* type().structFields()} with {@link Type.StructField#getName()} equal to {@code columnName}
7272
*/
@@ -157,131 +157,151 @@ default Value getValue(int columnIndex) {
157157
throw new UnsupportedOperationException("method should be overwritten");
158158
}
159159

160-
/** Returns the value of a nullable column as a {@link Value}. */
160+
/**
161+
* @param columnName
162+
* @return the value of a nullable column as a {@link Value}.
163+
*/
161164
default Value getValue(String columnName) {
162165
throw new UnsupportedOperationException("method should be overwritten");
163166
}
164167

165168
/**
166-
* Returns the value of a non-{@code NULL} column with type {@code Type.array(Type.bool())}.
169+
* @param columnIndex
170+
* @return the value of a non-{@code NULL} column with type {@code Type.array(Type.bool())}.
167171
*
168172
* @throws NullPointerException if any element of the array value is {@code NULL}. If the array
169173
* may contain {@code NULL} values, use {@link #getBooleanList(int)} instead.
170174
*/
171175
boolean[] getBooleanArray(int columnIndex);
172176

173177
/**
174-
* Returns the value of a non-{@code NULL} column with type {@code Type.array(Type.bool())}.
178+
* @param columnName
179+
* @return the value of a non-{@code NULL} column with type {@code Type.array(Type.bool())}.
175180
*
176181
* @throws NullPointerException if any element of the array value is {@code NULL}. If the array
177182
* may contain {@code NULL} values, use {@link #getBooleanList(String)} instead.
178183
*/
179184
boolean[] getBooleanArray(String columnName);
180185

181186
/**
182-
* Returns the value of a non-{@code NULL} column with type {@code Type.array(Type.bool())}. The
187+
* @param columnIndex
188+
* @return the value of a non-{@code NULL} column with type {@code Type.array(Type.bool())}. The
183189
* list returned by this method is lazily constructed. Create a copy of it if you intend to access
184190
* each element in the list multiple times.
185191
*/
186192
List<Boolean> getBooleanList(int columnIndex);
187193

188194
/**
189-
* Returns the value of a non-{@code NULL} column with type {@code Type.array(Type.bool())}. The
195+
* @param columnName
196+
* @return the value of a non-{@code NULL} column with type {@code Type.array(Type.bool())}. The
190197
* list returned by this method is lazily constructed. Create a copy of it if you intend to access
191198
* each element in the list multiple times.
192199
*/
193200
List<Boolean> getBooleanList(String columnName);
194201

195202
/**
196-
* Returns the value of a non-{@code NULL} column with type {@code Type.array(Type.int64())}.
203+
* @param columnIndex
204+
* @return the value of a non-{@code NULL} column with type {@code Type.array(Type.int64())}.
197205
*
198206
* @throws NullPointerException if any element of the array value is {@code NULL}. If the array
199207
* may contain {@code NULL} values, use {@link #getLongList(int)} instead.
200208
*/
201209
long[] getLongArray(int columnIndex);
202210

203211
/**
204-
* Returns the value of a non-{@code NULL} column with type {@code Type.array(Type.int64())}.
212+
* @param columnName
213+
* @return the value of a non-{@code NULL} column with type {@code Type.array(Type.int64())}.
205214
*
206215
* @throws NullPointerException if any element of the array value is {@code NULL}. If the array
207216
* may contain {@code NULL} values, use {@link #getLongList(String)} instead.
208217
*/
209218
long[] getLongArray(String columnName);
210219

211220
/**
212-
* Returns the value of a non-{@code NULL} column with type {@code Type.array(Type.int64())}. The
221+
* @param columnIndex
222+
* @return the value of a non-{@code NULL} column with type {@code Type.array(Type.int64())}. The
213223
* list returned by this method is lazily constructed. Create a copy of it if you intend to access
214224
* each element in the list multiple times.
215225
*/
216226
List<Long> getLongList(int columnIndex);
217227

218228
/**
219-
* Returns the value of a non-{@code NULL} column with type {@code Type.array(Type.int64())}. The
229+
* @param columnName
230+
* @return the value of a non-{@code NULL} column with type {@code Type.array(Type.int64())}. The
220231
* list returned by this method is lazily constructed. Create a copy of it if you intend to access
221232
* each element in the list multiple times.
222233
*/
223234
List<Long> getLongList(String columnName);
224235

225236
/**
226-
* Returns the value of a non-{@code NULL} column with type {@code Type.array(Type.float64())}.
237+
* @param columnIndex
238+
* @return the value of a non-{@code NULL} column with type {@code Type.array(Type.float64())}.
227239
*
228240
* @throws NullPointerException if any element of the array value is {@code NULL}. If the array
229241
* may contain {@code NULL} values, use {@link #getDoubleList(int)} instead.
230242
*/
231243
double[] getDoubleArray(int columnIndex);
232244

233245
/**
234-
* Returns the value of a non-{@code NULL} column with type {@code Type.array(Type.float64())}.
246+
* @param columnName
247+
* @return the value of a non-{@code NULL} column with type {@code Type.array(Type.float64())}.
235248
*
236249
* @throws NullPointerException if any element of the array value is {@code NULL}. If the array
237250
* may contain {@code NULL} values, use {@link #getDoubleList(String)} instead.
238251
*/
239252
double[] getDoubleArray(String columnName);
240253

241254
/**
242-
* Returns the value of a non-{@code NULL} column with type {@code Type.array(Type.float64())} The
255+
* @param columnIndex
256+
* @return the value of a non-{@code NULL} column with type {@code Type.array(Type.float64())} The
243257
* list returned by this method is lazily constructed. Create a copy of it if you intend to access
244258
* each element in the list multiple times.
245259
*/
246260
List<Double> getDoubleList(int columnIndex);
247261

248262
/**
249-
* Returns the value of a non-{@code NULL} column with type {@code Type.array(Type.float64())} The
263+
* @param columnName
264+
* @return the value of a non-{@code NULL} column with type {@code Type.array(Type.float64())} The
250265
* list returned by this method is lazily constructed. Create a copy of it if you intend to access
251266
* each element in the list multiple times.
252267
*/
253268
List<Double> getDoubleList(String columnName);
254269

255270
/**
256-
* Returns the value of a non-{@code NULL} column with type {@code Type.array(Type.numeric())} The
271+
* @param columnIndex
272+
* @return the value of a non-{@code NULL} column with type {@code Type.array(Type.numeric())} The
257273
* list returned by this method is lazily constructed. Create a copy of it if you intend to access
258274
* each element in the list multiple times.
259275
*/
260276
List<BigDecimal> getBigDecimalList(int columnIndex);
261277

262278
/**
263-
* Returns the value of a non-{@code NULL} column with type {@code Type.array(Type.numeric())} The
279+
* @param columnName
280+
* @return the value of a non-{@code NULL} column with type {@code Type.array(Type.numeric())} The
264281
* list returned by this method is lazily constructed. Create a copy of it if you intend to access
265282
* each element in the list multiple times.
266283
*/
267284
List<BigDecimal> getBigDecimalList(String columnName);
268285

269286
/**
270-
* Returns the value of a non-{@code NULL} column with type {@code Type.array(Type.string())}. The
287+
* @param columnIndex
288+
* @return the value of a non-{@code NULL} column with type {@code Type.array(Type.string())}. The
271289
* list returned by this method is lazily constructed. Create a copy of it if you intend to access
272290
* each element in the list multiple times.
273291
*/
274292
List<String> getStringList(int columnIndex);
275293

276294
/**
277-
* Returns the value of a non-{@code NULL} column with type {@code Type.array(Type.string())}. The
295+
* @param columnName
296+
* @return the value of a non-{@code NULL} column with type {@code Type.array(Type.string())}. The
278297
* list returned by this method is lazily constructed. Create a copy of it if you intend to access
279298
* each element in the list multiple times.
280299
*/
281300
List<String> getStringList(String columnName);
282301

283302
/**
284-
* Returns the value of a non-{@code NULL} column with type {@code Type.array(Type.json())}. The
303+
* @param columnIndex
304+
* @return the value of a non-{@code NULL} column with type {@code Type.array(Type.json())}. The
285305
* list returned by this method is lazily constructed. Create a copy of it if you intend to access
286306
* each element in the list multiple times.
287307
*/
@@ -290,7 +310,8 @@ default List<String> getJsonList(int columnIndex) {
290310
};
291311

292312
/**
293-
* Returns the value of a non-{@code NULL} column with type {@code Type.array(Type.json())}. The
313+
* @param columnName
314+
* @return the value of a non-{@code NULL} column with type {@code Type.array(Type.json())}. The
294315
* list returned by this method is lazily constructed. Create a copy of it if you intend to access
295316
* each element in the list multiple times.
296317
*/
@@ -299,7 +320,8 @@ default List<String> getJsonList(String columnName) {
299320
};
300321

301322
/**
302-
* Returns the value of a non-{@code NULL} column with type {@code Type.array(Type.pgJsonb())} The
323+
* @param columnIndex
324+
* @return the value of a non-{@code NULL} column with type {@code Type.array(Type.pgJsonb())} The
303325
* list returned by this method is lazily constructed. Create a copy of it if you intend to access
304326
* each element in the list multiple times.
305327
*/
@@ -308,7 +330,8 @@ default List<String> getPgJsonbList(int columnIndex) {
308330
};
309331

310332
/**
311-
* Returns the value of a non-{@code NULL} column with type {@code Type.array(Type.pgJsonb())} The
333+
* @param columnName
334+
* @return the value of a non-{@code NULL} column with type {@code Type.array(Type.pgJsonb())} The
312335
* list returned by this method is lazily constructed. Create a copy of it if you intend to access
313336
* each element in the list multiple times.
314337
*/
@@ -317,56 +340,64 @@ default List<String> getPgJsonbList(String columnName) {
317340
};
318341

319342
/**
320-
* Returns the value of a non-{@code NULL} column with type {@code Type.array(Type.bytes())}. The
343+
* @param columnIndex
344+
* @return the value of a non-{@code NULL} column with type {@code Type.array(Type.bytes())}. The
321345
* list returned by this method is lazily constructed. Create a copy of it if you intend to access
322346
* each element in the list multiple times.
323347
*/
324348
List<ByteArray> getBytesList(int columnIndex);
325349

326350
/**
327-
* Returns the value of a non-{@code NULL} column with type {@code Type.array(Type.bytes())}. The
351+
* @param columnName
352+
* @return the value of a non-{@code NULL} column with type {@code Type.array(Type.bytes())}. The
328353
* list returned by this method is lazily constructed. Create a copy of it if you intend to access
329354
* each element in the list multiple times.
330355
*/
331356
List<ByteArray> getBytesList(String columnName);
332357

333358
/**
334-
* Returns the value of a non-{@code NULL} column with type {@code Type.array(Type.timestamp())}
359+
* @param columnIndex
360+
* @return the value of a non-{@code NULL} column with type {@code Type.array(Type.timestamp())}
335361
* The list returned by this method is lazily constructed. Create a copy of it if you intend to
336362
* access each element in the list multiple times.
337363
*/
338364
List<Timestamp> getTimestampList(int columnIndex);
339365

340366
/**
341-
* Returns the value of a non-{@code NULL} column with type {@code Type.array(Type.timestamp())}
367+
* @param columnName
368+
* @return the value of a non-{@code NULL} column with type {@code Type.array(Type.timestamp())}
342369
* The list returned by this method is lazily constructed. Create a copy of it if you intend to
343370
* access each element in the list multiple times.
344371
*/
345372
List<Timestamp> getTimestampList(String columnName);
346373

347374
/**
348-
* Returns the value of a non-{@code NULL} column with type {@code Type.array(Type.date())}. The
375+
* @param columnIndex
376+
* @return the value of a non-{@code NULL} column with type {@code Type.array(Type.date())}. The
349377
* list returned by this method is lazily constructed. Create a copy of it if you intend to access
350378
* each element in the list multiple times.
351379
*/
352380
List<Date> getDateList(int columnIndex);
353381

354382
/**
355-
* Returns the value of a non-{@code NULL} column with type {@code Type.array(Type.date())}. The
383+
* @param columnName
384+
* @return the value of a non-{@code NULL} column with type {@code Type.array(Type.date())}. The
356385
* list returned by this method is lazily constructed. Create a copy of it if you intend to access
357386
* each element in the list multiple times.
358387
*/
359388
List<Date> getDateList(String columnName);
360389

361390
/**
362-
* Returns the value of a non-{@code NULL} column with type {@code Type.array(Type.struct(...))}
391+
* @param columnIndex
392+
* @return the value of a non-{@code NULL} column with type {@code Type.array(Type.struct(...))}
363393
* The list returned by this method is lazily constructed. Create a copy of it if you intend to
364394
* access each element in the list multiple times.
365395
*/
366396
List<Struct> getStructList(int columnIndex);
367397

368398
/**
369-
* Returns the value of a non-{@code NULL} column with type {@code Type.array(Type.struct(...))}
399+
* @param columnName
400+
* @return the value of a non-{@code NULL} column with type {@code Type.array(Type.struct(...))}
370401
* The list returned by this method is lazily constructed. Create a copy of it if you intend to
371402
* access each element in the list multiple times.
372403
*/

0 commit comments

Comments
 (0)