Skip to content

Commit e926c4e

Browse files
committed
Rename Object parameter name.
Signed-off-by: hgh1472 <[email protected]>
1 parent b09f752 commit e926c4e

File tree

2 files changed

+14
-12
lines changed

2 files changed

+14
-12
lines changed

src/main/java/org/springframework/data/redis/core/DefaultZSetOperations.java

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@
4545
* @author Andrey Shlykov
4646
* @author Shyngys Sapraliyev
4747
* @author John Blum
48+
* @author Gunha Hwang
4849
*/
4950
@NullUnmarked
5051
class DefaultZSetOperations<K, V> extends AbstractOperations<K, V> implements ZSetOperations<K, V> {
@@ -349,10 +350,10 @@ public Set<TypedTuple<V>> reverseRangeByScoreWithScores(@NonNull K key, double m
349350
}
350351

351352
@Override
352-
public Long rank(@NonNull K key, @NonNull Object o) {
353+
public Long rank(@NonNull K key, @NonNull Object value) {
353354

354355
byte[] rawKey = rawKey(key);
355-
byte[] rawValue = rawValue(o);
356+
byte[] rawValue = rawValue(value);
356357

357358
return execute(connection -> {
358359
Long zRank = connection.zRank(rawKey, rawValue);
@@ -361,10 +362,10 @@ public Long rank(@NonNull K key, @NonNull Object o) {
361362
}
362363

363364
@Override
364-
public Long reverseRank(@NonNull K key, @NonNull Object o) {
365+
public Long reverseRank(@NonNull K key, @NonNull Object value) {
365366

366367
byte[] rawKey = rawKey(key);
367-
byte[] rawValue = rawValue(o);
368+
byte[] rawValue = rawValue(value);
368369

369370
return execute(connection -> {
370371
Long zRank = connection.zRevRank(rawKey, rawValue);
@@ -406,10 +407,10 @@ public Long removeRangeByScore(@NonNull K key, double min, double max) {
406407
}
407408

408409
@Override
409-
public Double score(@NonNull K key, Object o) {
410+
public Double score(@NonNull K key, Object value) {
410411

411412
byte[] rawKey = rawKey(key);
412-
byte[] rawValue = rawValue(o);
413+
byte[] rawValue = rawValue(value);
413414

414415
return execute(connection -> connection.zScore(rawKey, rawValue));
415416
}

src/main/java/org/springframework/data/redis/core/ZSetOperations.java

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@
4343
* @author Wongoo (望哥)
4444
* @author Andrey Shlykov
4545
* @author Shyngys Sapraliyev
46+
* @author Gunha Hwang
4647
*/
4748
@NullUnmarked
4849
public interface ZSetOperations<K, V> {
@@ -210,21 +211,21 @@ static <V> TypedTuple<V> of(@NonNull V value, @Nullable Double score) {
210211
* Determine the index of element with {@code value} in a sorted set.
211212
*
212213
* @param key must not be {@literal null}.
213-
* @param o the value.
214+
* @param value the value.
214215
* @return {@literal null} when used in pipeline / transaction.
215216
* @see <a href="https://redis.io/commands/zrank">Redis Documentation: ZRANK</a>
216217
*/
217-
Long rank(@NonNull K key, @NonNull Object o);
218+
Long rank(@NonNull K key, @NonNull Object value);
218219

219220
/**
220221
* Determine the index of element with {@code value} in a sorted set when scored high to low.
221222
*
222223
* @param key must not be {@literal null}.
223-
* @param o the value.
224+
* @param value the value.
224225
* @return {@literal null} when used in pipeline / transaction.
225226
* @see <a href="https://redis.io/commands/zrevrank">Redis Documentation: ZREVRANK</a>
226227
*/
227-
Long reverseRank(@NonNull K key, @NonNull Object o);
228+
Long reverseRank(@NonNull K key, @NonNull Object value);
228229

229230
/**
230231
* Get elements between {@code start} and {@code end} from sorted set.
@@ -525,11 +526,11 @@ default TypedTuple<V> popMax(@NonNull K key, @NonNull Duration timeout) {
525526
* Get the score of element with {@code value} from sorted set with key {@code key}.
526527
*
527528
* @param key must not be {@literal null}.
528-
* @param o the value.
529+
* @param value the value.
529530
* @return {@literal null} when used in pipeline / transaction.
530531
* @see <a href="https://redis.io/commands/zscore">Redis Documentation: ZSCORE</a>
531532
*/
532-
Double score(@NonNull K key, Object o);
533+
Double score(@NonNull K key, Object value);
533534

534535
/**
535536
* Get the scores of elements with {@code values} from sorted set with key {@code key}.

0 commit comments

Comments
 (0)