From 5f61d71843b6b0cedba18e83199254d5c359ce04 Mon Sep 17 00:00:00 2001 From: SanHalacogluImproving <144171266+SanHalacogluImproving@users.noreply.github.com> Date: Tue, 5 Mar 2024 12:19:01 -0800 Subject: [PATCH] Java: Stylistic documentation changes Set Commands. (#124) (#1071) * Java: Stylistic documentation changes. (#124) * Minor Documentation changes. --- .../java/glide/api/commands/SetCommands.java | 32 +++++++++---------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/java/client/src/main/java/glide/api/commands/SetCommands.java b/java/client/src/main/java/glide/api/commands/SetCommands.java index f2098c9b08..c5463ca18c 100644 --- a/java/client/src/main/java/glide/api/commands/SetCommands.java +++ b/java/client/src/main/java/glide/api/commands/SetCommands.java @@ -21,10 +21,10 @@ public interface SetCommands { * @remarks If key does not exist, a new set is created before adding members * . * @example - *

- * int result = client.sadd("my_set", new String[]{"member1", "member2"}).get(); - * // result: 2 - * + *

{@code
+     * Long result = client.sadd("my_set", new String[]{"member1", "member2"}).get();
+     * assert result == 2L;
+     * }
*/ CompletableFuture sadd(String key, String[] members); @@ -39,10 +39,10 @@ public interface SetCommands { * @remarks If key does not exist, it is treated as an empty set and this command * returns 0. * @example - *

- * int result = client.srem("my_set", new String[]{"member1", "member2"}).get(); - * // result: 2 - * + *

{@code
+     * Long result = client.srem("my_set", new String[]{"member1", "member2"}).get();
+     * assert result == 2L;
+     * }
*/ CompletableFuture srem(String key, String[] members); @@ -54,10 +54,10 @@ public interface SetCommands { * @return A Set of all members of the set. * @remarks If key does not exist an empty set will be returned. * @example - *

- * {@literal Set} result = client.smembers("my_set").get(); - * // result: {"member1", "member2", "member3"} - * + *

{@code
+     * Set result = client.smembers("my_set").get();
+     * assert result.equals(Set.of("member1", "member2", "member3"));
+     * }
*/ CompletableFuture> smembers(String key); @@ -68,10 +68,10 @@ public interface SetCommands { * @param key The key from which to retrieve the number of set members. * @return The cardinality (number of elements) of the set, or 0 if the key does not exist. * @example - *

- * int result = client.scard("my_set").get(); - * // result: 3 - * + *

{@code
+     * Long result = client.scard("my_set").get();
+     * assert result == 3L;
+     * }
*/ CompletableFuture scard(String key); }