- * 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
- * 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