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); }