diff --git a/pom.xml b/pom.xml index 113643c..63689d9 100644 --- a/pom.xml +++ b/pom.xml @@ -32,8 +32,8 @@ http://github.com/xetorthio/jedis - scm:git:http://github.com/xetorthio/jedis.git - scm:git:http://github.com/xetorthio/jedis.git + scm:git:git@github.com:xetorthio/jedis.git + scm:git:git@github.com:xetorthio/jedis.git diff --git a/src/main/java/redis/clients/jedis/SortingParams.java b/src/main/java/redis/clients/jedis/SortingParams.java index fef950d..dcd415d 100644 --- a/src/main/java/redis/clients/jedis/SortingParams.java +++ b/src/main/java/redis/clients/jedis/SortingParams.java @@ -10,110 +10,110 @@ import java.util.List; * */ public class SortingParams { - private List params = new ArrayList(); + private List params = new ArrayList(); - /** - * Sort by weight in keys. - *

- * Takes a pattern that is used in order to generate the key names of the - * weights used for sorting. Weight key names are obtained substituting the - * first occurrence of * with the actual value of the elements on the list. - *

- * The pattern for a normal key/value pair is "keyname*" and for a value in - * a hash "keyname*->fieldname". - * - * @param pattern - * @return the SortingParams Object - */ - public SortingParams by(String pattern) { - params.add("BY"); - params.add(pattern); - return this; - } + /** + * Sort by weight in keys. + *

+ * Takes a pattern that is used in order to generate the key names of the + * weights used for sorting. Weight key names are obtained substituting the + * first occurrence of * with the actual value of the elements on the list. + *

+ * The pattern for a normal key/value pair is "keyname*" and for a value in + * a hash "keyname*->fieldname". + * + * @param pattern + * @return the SortingParams Object + */ + public SortingParams by(String pattern) { + params.add("BY"); + params.add(pattern); + return this; + } - /** - * No sorting. - *

- * This is useful if you want to retrieve a external key (using - * {@link #get(String...) GET}) but you don't want the sorting overhead. - * - * @return the SortingParams Object - */ - public SortingParams nosort() { - params.add("BY nosort"); - return this; - } + /** + * No sorting. + *

+ * This is useful if you want to retrieve a external key (using + * {@link #get(String...) GET}) but you don't want the sorting overhead. + * + * @return the SortingParams Object + */ + public SortingParams nosort() { + params.add("BY nosort"); + return this; + } - public Collection getParams() { - return Collections.unmodifiableCollection(params); - } + public Collection getParams() { + return Collections.unmodifiableCollection(params); + } - /** - * Get the Sorting in Descending Order. - * - * @return the sortingParams Object - */ - public SortingParams desc() { - params.add("DESC"); - return this; - } + /** + * Get the Sorting in Descending Order. + * + * @return the sortingParams Object + */ + public SortingParams desc() { + params.add("DESC"); + return this; + } - /** - * Get the Sorting in Ascending Order. This is the default order. - * - * @return the SortingParams Object - */ - public SortingParams asc() { - params.add("ASC"); - return this; - } + /** + * Get the Sorting in Ascending Order. This is the default order. + * + * @return the SortingParams Object + */ + public SortingParams asc() { + params.add("ASC"); + return this; + } - /** - * Limit the Numbers of returned Elements. - * - * @param start - * is zero based - * @param count - * @return the SortingParams Object - */ - public SortingParams limit(int start, int count) { - params.add("LIMIT"); - params.add(String.valueOf(start)); - params.add(String.valueOf(count)); - return this; - } + /** + * Limit the Numbers of returned Elements. + * + * @param start + * is zero based + * @param count + * @return the SortingParams Object + */ + public SortingParams limit(int start, int count) { + params.add("LIMIT"); + params.add(String.valueOf(start)); + params.add(String.valueOf(count)); + return this; + } - /** - * Sort lexicographicaly. Note that Redis is utf-8 aware assuming you set - * the right value for the LC_COLLATE environment variable. - * - * @return the SortingParams Object - */ - public SortingParams alpha() { - params.add("ALPHA"); - return this; - } + /** + * Sort lexicographicaly. Note that Redis is utf-8 aware assuming you set + * the right value for the LC_COLLATE environment variable. + * + * @return the SortingParams Object + */ + public SortingParams alpha() { + params.add("ALPHA"); + return this; + } - /** - * Retrieving external keys from the result of the search. - *

- * Takes a pattern that is used in order to generate the key names of the - * result of sorting. The key names are obtained substituting the - * first occurrence of * with the actual value of the elements on the list. - *

- * The pattern for a normal key/value pair is "keyname*" and for a value in - * a hash "keyname*->fieldname". - *

- * To get the list itself use the char # as pattern. - * - * @param patterns - * @return the SortingParams Object - */ - public SortingParams get(String... patterns) { - for (String pattern : patterns) { - params.add("GET"); - params.add(pattern); - } - return this; + /** + * Retrieving external keys from the result of the search. + *

+ * Takes a pattern that is used in order to generate the key names of the + * result of sorting. The key names are obtained substituting the first + * occurrence of * with the actual value of the elements on the list. + *

+ * The pattern for a normal key/value pair is "keyname*" and for a value in + * a hash "keyname*->fieldname". + *

+ * To get the list itself use the char # as pattern. + * + * @param patterns + * @return the SortingParams Object + */ + public SortingParams get(String... patterns) { + for (String pattern : patterns) { + params.add("GET"); + params.add(pattern); } + return this; + } } \ No newline at end of file