From 659d64d63bec59814e721da0783b87fee9bee3de Mon Sep 17 00:00:00 2001 From: Oliver Gierke Date: Thu, 23 Jan 2014 12:23:13 +0100 Subject: [PATCH] DATACMNS-429 - Improved JavaDoc for PageRequest and Sort. Added a few missing parameter documentations in terms of semantics and nullability. --- .../data/domain/PageRequest.java | 18 +++++++++--------- .../org/springframework/data/domain/Sort.java | 8 ++++---- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/src/main/java/org/springframework/data/domain/PageRequest.java b/src/main/java/org/springframework/data/domain/PageRequest.java index d73042f4e..19a17e1ce 100644 --- a/src/main/java/org/springframework/data/domain/PageRequest.java +++ b/src/main/java/org/springframework/data/domain/PageRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2008-2013 the original author or authors. + * Copyright 2008-2014 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -36,8 +36,8 @@ public class PageRequest implements Pageable, Serializable { * Creates a new {@link PageRequest}. Pages are zero indexed, thus providing 0 for {@code page} will return the first * page. * - * @param size - * @param page + * @param page zero-based page index. + * @param size the size of the page to be returned. */ public PageRequest(int page, int size) { this(page, size, null); @@ -46,10 +46,10 @@ public class PageRequest implements Pageable, Serializable { /** * Creates a new {@link PageRequest} with sort parameters applied. * - * @param page - * @param size - * @param direction - * @param properties + * @param page zero-based page index. + * @param size the size of the page to be returned. + * @param direction the direction of the {@link Sort} to be specified, can be {@literal null}. + * @param properties the properties to sort by, must not be {@literal null} or empty. */ public PageRequest(int page, int size, Direction direction, String... properties) { this(page, size, new Sort(direction, properties)); @@ -58,8 +58,8 @@ public class PageRequest implements Pageable, Serializable { /** * Creates a new {@link PageRequest} with sort parameters applied. * - * @param page - * @param size + * @param page zero-based page index. + * @param size the size of the page to be returned. * @param sort can be {@literal null}. */ public PageRequest(int page, int size, Sort sort) { diff --git a/src/main/java/org/springframework/data/domain/Sort.java b/src/main/java/org/springframework/data/domain/Sort.java index b83dbe188..6ca016e7b 100644 --- a/src/main/java/org/springframework/data/domain/Sort.java +++ b/src/main/java/org/springframework/data/domain/Sort.java @@ -1,5 +1,5 @@ /* - * Copyright 2008-2013 the original author or authors. + * Copyright 2008-2014 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -73,7 +73,7 @@ public class Sort implements Iterable() : Arrays.asList(properties)); @@ -82,8 +82,8 @@ public class Sort implements Iterable properties) {