|
27 | 27 | */
|
28 | 28 | public interface RedisSet<E> extends RedisCollection<E>, Set<E> {
|
29 | 29 |
|
| 30 | + /** |
| 31 | + * Intersect this set and another {@link RedisSet}. |
| 32 | + * |
| 33 | + * @param set must not be {@literal null}. |
| 34 | + * @return a {@link Set} containing the intersecting values. |
| 35 | + * @since 1.0 |
| 36 | + */ |
30 | 37 | Set<E> intersect(RedisSet<?> set);
|
31 | 38 |
|
| 39 | + /** |
| 40 | + * Intersect this set and other {@link RedisSet}s. |
| 41 | + * |
| 42 | + * @param sets must not be {@literal null}. |
| 43 | + * @return a {@link Set} containing the intersecting values. |
| 44 | + * @since 1.0 |
| 45 | + */ |
32 | 46 | Set<E> intersect(Collection<? extends RedisSet<?>> sets);
|
33 | 47 |
|
| 48 | + /** |
| 49 | + * Union this set and another {@link RedisSet}. |
| 50 | + * |
| 51 | + * @param set must not be {@literal null}. |
| 52 | + * @return a {@link Set} containing the combined values. |
| 53 | + * @since 2.6 |
| 54 | + */ |
34 | 55 | Set<E> union(RedisSet<?> set);
|
35 | 56 |
|
| 57 | + /** |
| 58 | + * Union this set and other {@link RedisSet}s. |
| 59 | + * |
| 60 | + * @param sets must not be {@literal null}. |
| 61 | + * @return a {@link Set} containing the combined values. |
| 62 | + * @since 1.0 |
| 63 | + */ |
36 | 64 | Set<E> union(Collection<? extends RedisSet<?>> sets);
|
37 | 65 |
|
| 66 | + /** |
| 67 | + * Diff this set and another {@link RedisSet}. |
| 68 | + * |
| 69 | + * @param set must not be {@literal null}. |
| 70 | + * @return a {@link Set} containing the values that differ. |
| 71 | + * @since 1.0 |
| 72 | + */ |
38 | 73 | Set<E> diff(RedisSet<?> set);
|
39 | 74 |
|
| 75 | + /** |
| 76 | + * Diff this set and other {@link RedisSet}s. |
| 77 | + * |
| 78 | + * @param sets must not be {@literal null}. |
| 79 | + * @return a {@link Set} containing the values that differ. |
| 80 | + * @since 1.0 |
| 81 | + */ |
40 | 82 | Set<E> diff(Collection<? extends RedisSet<?>> sets);
|
41 | 83 |
|
| 84 | + /** |
| 85 | + * Create a new {@link RedisSet} by intersecting this sorted set and {@link RedisSet} and store result in |
| 86 | + * destination {@code destKey}. |
| 87 | + * |
| 88 | + * @param set must not be {@literal null}. |
| 89 | + * @param destKey must not be {@literal null}. |
| 90 | + * @return a new {@link RedisSet} pointing at {@code destKey} |
| 91 | + * @since 1.0 |
| 92 | + */ |
42 | 93 | RedisSet<E> intersectAndStore(RedisSet<?> set, String destKey);
|
43 | 94 |
|
| 95 | + /** |
| 96 | + * Create a new {@link RedisSet} by intersecting this sorted set and the collection {@link RedisSet} and store |
| 97 | + * result in destination {@code destKey}. |
| 98 | + * |
| 99 | + * @param sets must not be {@literal null}. |
| 100 | + * @param destKey must not be {@literal null}. |
| 101 | + * @return a new {@link RedisSet} pointing at {@code destKey}. |
| 102 | + * @since 1.0 |
| 103 | + */ |
44 | 104 | RedisSet<E> intersectAndStore(Collection<? extends RedisSet<?>> sets, String destKey);
|
45 | 105 |
|
| 106 | + /** |
| 107 | + * Create a new {@link RedisSet} by union this sorted set and {@link RedisSet} and store result in destination |
| 108 | + * {@code destKey}. |
| 109 | + * |
| 110 | + * @param set must not be {@literal null}. |
| 111 | + * @param destKey must not be {@literal null}. |
| 112 | + * @return a new {@link RedisSet} pointing at {@code destKey}. |
| 113 | + * @since 1.0 |
| 114 | + */ |
46 | 115 | RedisSet<E> unionAndStore(RedisSet<?> set, String destKey);
|
47 | 116 |
|
| 117 | + /** |
| 118 | + * Create a new {@link RedisSet} by union this sorted set and the collection {@link RedisSet} and store result in |
| 119 | + * destination {@code destKey}. |
| 120 | + * |
| 121 | + * @param sets must not be {@literal null}. |
| 122 | + * @param destKey must not be {@literal null}. |
| 123 | + * @return a new {@link RedisSet} pointing at {@code destKey}. |
| 124 | + * @since 1.0 |
| 125 | + */ |
48 | 126 | RedisSet<E> unionAndStore(Collection<? extends RedisSet<?>> sets, String destKey);
|
49 | 127 |
|
| 128 | + /** |
| 129 | + * Create a new {@link RedisSet} by diffing this sorted set and {@link RedisSet} and store result in destination |
| 130 | + * {@code destKey}. |
| 131 | + * |
| 132 | + * @param set must not be {@literal null}. |
| 133 | + * @param destKey must not be {@literal null}. |
| 134 | + * @return a new {@link RedisSet} pointing at {@code destKey}. |
| 135 | + * @since 1.0 |
| 136 | + */ |
50 | 137 | RedisSet<E> diffAndStore(RedisSet<?> set, String destKey);
|
51 | 138 |
|
| 139 | + /** |
| 140 | + * Create a new {@link RedisSet} by diffing this sorted set and the collection {@link RedisSet} and store result in |
| 141 | + * destination {@code destKey}. |
| 142 | + * |
| 143 | + * @param sets must not be {@literal null}. |
| 144 | + * @param destKey must not be {@literal null}. |
| 145 | + * @return a new {@link RedisSet} pointing at {@code destKey}. |
| 146 | + * @since 1.0 |
| 147 | + */ |
52 | 148 | RedisSet<E> diffAndStore(Collection<? extends RedisSet<?>> sets, String destKey);
|
53 | 149 |
|
54 | 150 | /**
|
|
0 commit comments