Skip to content

Commit

Permalink
Java: Stylistic documentation changes Set Commands. (#124) (valkey-io…
Browse files Browse the repository at this point in the history
…#1071)

* Java: Stylistic documentation changes. (#124)

* Minor Documentation changes.
  • Loading branch information
SanHalacogluImproving authored Mar 5, 2024
1 parent f1d5e67 commit 2495984
Showing 1 changed file with 16 additions and 16 deletions.
32 changes: 16 additions & 16 deletions java/client/src/main/java/glide/api/commands/SetCommands.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ public interface SetCommands {
* @remarks If <code>key</code> does not exist, a new set is created before adding <code>members
* </code>.
* @example
* <p><code>
* int result = client.sadd("my_set", new String[]{"member1", "member2"}).get();
* // result: 2
* </code>
* <pre>{@code
* Long result = client.sadd("my_set", new String[]{"member1", "member2"}).get();
* assert result == 2L;
* }</pre>
*/
CompletableFuture<Long> sadd(String key, String[] members);

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

Expand All @@ -54,10 +54,10 @@ public interface SetCommands {
* @return A <code>Set</code> of all members of the set.
* @remarks If <code>key</code> does not exist an empty set will be returned.
* @example
* <p><code>
* {@literal Set<String>} result = client.smembers("my_set").get();
* // result: {"member1", "member2", "member3"}
* </code>
* <pre>{@code
* Set<String> result = client.smembers("my_set").get();
* assert result.equals(Set.of("member1", "member2", "member3"));
* }</pre>
*/
CompletableFuture<Set<String>> smembers(String key);

Expand All @@ -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
* <p><code>
* int result = client.scard("my_set").get();
* // result: 3
* </code>
* <pre>{@code
* Long result = client.scard("my_set").get();
* assert result == 3L;
* }</pre>
*/
CompletableFuture<Long> scard(String key);
}

0 comments on commit 2495984

Please sign in to comment.