Skip to content

Commit 0390782

Browse files
committed
Wording.
1 parent ca52c86 commit 0390782

6 files changed

+49
-49
lines changed

src/net/njcull/collections/Collectors.java

Lines changed: 31 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
/**
99
* Implementations of stream {@link Collector}s for the maps and sets in this
10-
* package. Variations include map versus bimap, and various sorting options
10+
* package. Variations include map versus bi-map, and various sorting options
1111
* for those sets and maps that are ordered.
1212
*
1313
* @author run2000
@@ -106,16 +106,16 @@ private Collectors() {
106106

107107
/**
108108
* Returns a {@code Collector} that accumulates the input elements into a
109-
* new {@code ImmutableArrayMap}, created as a bimap, in encounter order.
109+
* new {@code ImmutableArrayMap}, created as a bi-map, in encounter order.
110110
* <p>
111-
* A bimap is a map where both keys and values are unique. Any given key
111+
* A bi-map is a map where both keys and values are unique. Any given key
112112
* can be mapped "forwards" to a single value; any given value can be
113113
* mapped "backwards" to a single key.
114114
*
115115
* @param <K> the type of keys in the resulting map
116116
* @param <V> the type of values in the resulting map
117117
* @return a {@code Collector} which collects all the input keys and values
118-
* into a {@code ImmutableArrayMap}, created as a bimap, in encounter order
118+
* into a {@code ImmutableArrayMap}, created as a bi-map, in encounter order
119119
*/
120120
public static <K,V> Collector<Map.Entry<? extends K,? extends V>, ?, ImmutableArrayMap<K,V>> toImmutableArrayBiMap() {
121121
return Collector.<Map.Entry<? extends K,? extends V>, ImmutableArrayMapBuilder<K,V>, ImmutableArrayMap<K,V>>of(
@@ -144,17 +144,17 @@ private Collectors() {
144144

145145
/**
146146
* Returns a {@code Collector} that accumulates the input elements into a
147-
* new {@code ImmutableHashedArrayMap}, created as a bimap, in
147+
* new {@code ImmutableHashedArrayMap}, created as a bi-map, in
148148
* encounter order.
149149
* <p>
150-
* A bimap is a map where both keys and values are unique. Any given key
150+
* A bi-map is a map where both keys and values are unique. Any given key
151151
* can be mapped "forwards" to a single value; any given value can be
152152
* mapped "backwards" to a single key.
153153
*
154154
* @param <K> the type of keys in the resulting map
155155
* @param <V> the type of values in the resulting map
156156
* @return a {@code Collector} which collects all the input keys and values
157-
* into a {@code ImmutableHashedArrayMap}, created as a bimap, in
157+
* into a {@code ImmutableHashedArrayMap}, created as a bi-map, in
158158
* encounter order
159159
*/
160160
public static <K,V> Collector<Map.Entry<? extends K,? extends V>, ?, ImmutableHashedArrayMap<K,V>> toImmutableHashedArrayBiMap() {
@@ -254,18 +254,18 @@ private Collectors() {
254254

255255
/**
256256
* Returns a {@code Collector} that accumulates the input elements into a
257-
* new {@code ImmutableSortedArrayMap}, created as a bimap, with elements
257+
* new {@code ImmutableSortedArrayMap}, created as a bi-map, with elements
258258
* ordered by their natural order.
259259
* <p>
260-
* A bimap is a map where both keys and values are unique. Any given key
260+
* A bi-map is a map where both keys and values are unique. Any given key
261261
* can be mapped "forwards" to a single value; any given value can be
262262
* mapped "backwards" to a single key.
263263
*
264264
* @param <K> the type of keys in the resulting map
265265
* @param <V> the type of values in the resulting map
266266
* @return a {@code Collector} which collects all the input keys and values
267-
* into a {@code ImmutableSortedArrayMap}, with elements ordered by their
268-
* natural order
267+
* into a {@code ImmutableSortedArrayMap}, created as a bi-map, with
268+
* elements ordered by their natural order
269269
*/
270270
public static <K,V> Collector<Map.Entry<? extends K,? extends V>, ?, ImmutableSortedArrayMap<K,V>> toImmutableSortedArrayBiMap() {
271271
return Collector.<Map.Entry<? extends K,? extends V>, ImmutableSortedArrayMapBuilder<K,V>, ImmutableSortedArrayMap<K,V>>of(
@@ -277,10 +277,10 @@ private Collectors() {
277277

278278
/**
279279
* Returns a {@code Collector} that accumulates the input elements into a
280-
* new {@code ImmutableSortedArrayMap}, created as a bimap, with keys
280+
* new {@code ImmutableSortedArrayMap}, created as a bi-map, with keys
281281
* ordered by the given {@code Comparator}.
282282
* <p>
283-
* A bimap is a map where both keys and values are unique. Any given key
283+
* A bi-map is a map where both keys and values are unique. Any given key
284284
* can be mapped "forwards" to a single value; any given value can be
285285
* mapped "backwards" to a single key.
286286
*
@@ -289,8 +289,8 @@ private Collectors() {
289289
* @param keyCmp a comparator for ordering keys, or {@code null} to indicate
290290
* natural key ordering
291291
* @return a {@code Collector} which collects all the input keys and values
292-
* into a {@code ImmutableSortedArrayMap}, with keys ordered by the given
293-
* comparator
292+
* into a {@code ImmutableSortedArrayMap}, created as a bi-map, with keys
293+
* ordered by the given comparator
294294
*/
295295
public static <K,V> Collector<Map.Entry<? extends K,? extends V>, ?, ImmutableSortedArrayMap<K,V>> toImmutableSortedArrayBiMapComparingKeys(
296296
final Comparator<? super K> keyCmp) {
@@ -303,10 +303,10 @@ private Collectors() {
303303

304304
/**
305305
* Returns a {@code Collector} that accumulates the input elements into a
306-
* new {@code ImmutableSortedArrayMap}, created as a bimap, with values
306+
* new {@code ImmutableSortedArrayMap}, created as a bi-map, with values
307307
* ordered by the given {@code Comparator}.
308308
* <p>
309-
* A bimap is a map where both keys and values are unique. Any given key
309+
* A bi-map is a map where both keys and values are unique. Any given key
310310
* can be mapped "forwards" to a single value; any given value can be
311311
* mapped "backwards" to a single key.
312312
*
@@ -315,8 +315,8 @@ private Collectors() {
315315
* @param valCmp a comparator for ordering values, or {@code null}
316316
* to indicate natural value ordering
317317
* @return a {@code Collector} which collects all the input keys and values
318-
* into a {@code ImmutableSortedArrayMap}, with values ordered by the given
319-
* comparator
318+
* into a {@code ImmutableSortedArrayMap}, created as a bi-map, with values
319+
* ordered by the given comparator
320320
*/
321321
public static <K,V> Collector<Map.Entry<? extends K,? extends V>, ?, ImmutableSortedArrayMap<K,V>> toImmutableSortedArrayBiMapComparingValues(
322322
final Comparator<? super V> valCmp) {
@@ -329,10 +329,10 @@ private Collectors() {
329329

330330
/**
331331
* Returns a {@code Collector} that accumulates the input elements into a
332-
* new {@code ImmutableSortedArrayMap}, created as a bimap, with keys
332+
* new {@code ImmutableSortedArrayMap}, created as a bi-map, with keys
333333
* and values ordered by the given {@code Comparator}s.
334334
* <p>
335-
* A bimap is a map where both keys and values are unique. Any given key
335+
* A bi-map is a map where both keys and values are unique. Any given key
336336
* can be mapped "forwards" to a single value; any given value can be
337337
* mapped "backwards" to a single key.
338338
*
@@ -343,8 +343,8 @@ private Collectors() {
343343
* @param valCmp a comparator for ordering values, or {@code null}
344344
* to indicate natural value ordering
345345
* @return a {@code Collector} which collects all the input keys and values
346-
* into a {@code ImmutableSortedArrayMap}, with keys and values ordered by
347-
* the given comparators
346+
* into a {@code ImmutableSortedArrayMap}, created as a bi-map, with keys
347+
* and values ordered by the given comparators
348348
*/
349349
public static <K,V> Collector<Map.Entry<? extends K,? extends V>, ?, ImmutableSortedArrayMap<K,V>> toImmutableSortedArrayBiMapComparingKeysAndValues(
350350
final Comparator<? super K> keyCmp, final Comparator<? super V> valCmp) {
@@ -398,18 +398,18 @@ private Collectors() {
398398

399399
/**
400400
* Returns a {@code Collector} that accumulates the input elements into a
401-
* new {@code ImmutableUniSortedArrayMap}, created as a bimap, with keys
401+
* new {@code ImmutableUniSortedArrayMap}, created as a bi-map, with keys
402402
* ordered by their natural order.
403403
* <p>
404-
* A bimap is a map where both keys and values are unique. Any given key
404+
* A bi-map is a map where both keys and values are unique. Any given key
405405
* can be mapped "forwards" to a single value; any given value can be
406406
* mapped "backwards" to a single key.
407407
*
408408
* @param <K> the type of keys in the resulting map
409409
* @param <V> the type of values in the resulting map
410410
* @return a {@code Collector} which collects all the input keys and values
411-
* into a {@code ImmutableSortedArrayMap}, with keys ordered by their
412-
* natural order
411+
* into a {@code ImmutableSortedArrayMap}, created as a bi-map, with keys
412+
* ordered by their natural order
413413
*/
414414
public static <K,V> Collector<Map.Entry<? extends K,? extends V>, ?, ImmutableUniSortedArrayMap<K,V>> toImmutableUniSortedArrayBiMap() {
415415
return Collector.<Map.Entry<? extends K,? extends V>, ImmutableUniSortedArrayMapBuilder<K,V>, ImmutableUniSortedArrayMap<K,V>>of(
@@ -421,10 +421,10 @@ private Collectors() {
421421

422422
/**
423423
* Returns a {@code Collector} that accumulates the input elements into a
424-
* new {@code ImmutableUniSortedArrayMap}, created as a bimap, with keys
424+
* new {@code ImmutableUniSortedArrayMap}, created as a bi-map, with keys
425425
* ordered by the given {@code Comparator}.
426426
* <p>
427-
* A bimap is a map where both keys and values are unique. Any given key
427+
* A bi-map is a map where both keys and values are unique. Any given key
428428
* can be mapped "forwards" to a single value; any given value can be
429429
* mapped "backwards" to a single key.
430430
*
@@ -433,8 +433,8 @@ private Collectors() {
433433
* @param keyCmp a comparator for ordering keys, or {@code null} to indicate
434434
* natural key ordering
435435
* @return a {@code Collector} which collects all the input keys and values
436-
* into a {@code ImmutableSortedArrayMap}, with keys ordered by the given
437-
* comparator
436+
* into a {@code ImmutableSortedArrayMap}, created as a bi-map, with keys
437+
* ordered by the given comparator
438438
*/
439439
public static <K,V> Collector<Map.Entry<? extends K,? extends V>, ?, ImmutableUniSortedArrayMap<K,V>> toImmutableUniSortedArrayBiMapComparing(
440440
final Comparator<? super K> keyCmp) {

src/net/njcull/collections/ImmutableArrayMapBuilder.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,11 @@ public static <K,V> ImmutableArrayMapBuilder<K,V> newMap() {
3131
}
3232

3333
/**
34-
* Create a new builder instance that builds a new immutable bimap.
34+
* Create a new builder instance that builds a new immutable bi-map.
3535
*
3636
* @param <K> the key type of the map
3737
* @param <V> the value type of the map
38-
* @return a new builder for building a new bimap
38+
* @return a new builder for building a new bi-map
3939
*/
4040
public static <K,V> ImmutableArrayMapBuilder<K,V> newBiMap() {
4141
ImmutableArrayMapBuilder<K,V> builder = new ImmutableArrayMapBuilder<>();

src/net/njcull/collections/ImmutableHashedArrayMapBuilder.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,11 @@ public static <K,V> ImmutableHashedArrayMapBuilder<K,V> newMap() {
3636
}
3737

3838
/**
39-
* Create a new builder instance that builds a new immutable hashed bimap.
39+
* Create a new builder instance that builds a new immutable hashed bi-map.
4040
*
4141
* @param <K> the key type of the map
4242
* @param <V> the value type of the map
43-
* @return a new builder for building a new bimap
43+
* @return a new builder for building a new bi-map
4444
*/
4545
public static <K,V> ImmutableHashedArrayMapBuilder<K,V> newBiMap() {
4646
ImmutableHashedArrayMapBuilder<K,V> builder = new ImmutableHashedArrayMapBuilder<>();

src/net/njcull/collections/ImmutableSortedArrayMapBuilder.java

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,11 @@ public static <K,V> ImmutableSortedArrayMapBuilder<K,V> newMap() {
3535
}
3636

3737
/**
38-
* Create a new builder instance that builds a new immutable sorted bimap.
38+
* Create a new builder instance that builds a new immutable sorted bi-map.
3939
*
4040
* @param <K> the key type of the map
4141
* @param <V> the value type of the map
42-
* @return a new builder for building a new bimap
42+
* @return a new builder for building a new bi-map
4343
*/
4444
public static <K,V> ImmutableSortedArrayMapBuilder<K,V> newBiMap() {
4545
ImmutableSortedArrayMapBuilder<K,V> builder = new ImmutableSortedArrayMapBuilder<>();
@@ -61,13 +61,13 @@ public static <K,V> ImmutableSortedArrayMapBuilder<K,V> newMapComparingKeys(Comp
6161
}
6262

6363
/**
64-
* Create a new builder instance that builds a new immutable sorted bimap
64+
* Create a new builder instance that builds a new immutable sorted bi-map
6565
* using the supplied comparator for sorting the keys.
6666
*
6767
* @param <K> the key type of the map
6868
* @param <V> the value type of the map
6969
* @param cmp the key comparator for sorting the map
70-
* @return a new builder for building a new map
70+
* @return a new builder for building a new bi-map
7171
*/
7272
public static <K,V> ImmutableSortedArrayMapBuilder<K,V> newBiMapComparingKeys(Comparator<? super K> cmp) {
7373
ImmutableSortedArrayMapBuilder<K,V> builder = new ImmutableSortedArrayMapBuilder<>();
@@ -89,13 +89,13 @@ public static <K,V> ImmutableSortedArrayMapBuilder<K,V> newMapComparingValues(Co
8989
}
9090

9191
/**
92-
* Create a new builder instance that builds a new immutable sorted bimap
92+
* Create a new builder instance that builds a new immutable sorted bi-map
9393
* using the supplied comparator for sorting the values.
9494
*
9595
* @param <K> the key type of the map
9696
* @param <V> the value type of the map
9797
* @param cmp the values comparator for sorting the map
98-
* @return a new builder for building a new map
98+
* @return a new builder for building a new bi-map
9999
*/
100100
public static <K,V> ImmutableSortedArrayMapBuilder<K,V> newBiMapComparingValues(Comparator<? super V> cmp) {
101101
ImmutableSortedArrayMapBuilder<K,V> builder = new ImmutableSortedArrayMapBuilder<>();
@@ -119,14 +119,14 @@ public static <K,V> ImmutableSortedArrayMapBuilder<K,V> newMapComparing(Comparat
119119
}
120120

121121
/**
122-
* Create a new builder instance that builds a new immutable sorted bimap
122+
* Create a new builder instance that builds a new immutable sorted bi-map
123123
* using the supplied comparators for sorting the keys and values.
124124
*
125125
* @param <K> the key type of the map
126126
* @param <V> the value type of the map
127127
* @param keyCmp the keys comparator for sorting the map
128128
* @param valCmp the values comparator for sorting the map
129-
* @return a new builder for building a new map
129+
* @return a new builder for building a new bi-map
130130
*/
131131
public static <K,V> ImmutableSortedArrayMapBuilder<K,V> newBiMapComparing(Comparator<? super K> keyCmp, Comparator<? super V> valCmp) {
132132
ImmutableSortedArrayMapBuilder<K,V> builder = new ImmutableSortedArrayMapBuilder<>();

src/net/njcull/collections/ImmutableSortedArrayPropertyMapBuilder.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ public static <K,V> ImmutableSortedArrayPropertyMapBuilder<K,V> newMap() {
4545
* @param <K> the key type of the map
4646
* @param <V> the value type of the map
4747
* @param supplier the key supplier
48-
* @return a new builder for building a new bimap
48+
* @return a new builder for building a new map
4949
*/
5050
public static <K,V> ImmutableSortedArrayPropertyMapBuilder<K,V> newMapWithKeys(Function<? super V, ? extends K> supplier) {
5151
ImmutableSortedArrayPropertyMapBuilder<K,V> builder = new ImmutableSortedArrayPropertyMapBuilder<>();
@@ -61,7 +61,7 @@ public static <K,V> ImmutableSortedArrayPropertyMapBuilder<K,V> newMapWithKeys(F
6161
* @param <V> the value type of the map
6262
* @param supplier the key supplier
6363
* @param keyCmp the key comparator
64-
* @return a new builder for building a new bimap
64+
* @return a new builder for building a new map
6565
*/
6666
public static <K,V> ImmutableSortedArrayPropertyMapBuilder<K,V> newMapWithKeysComparing(Function<? super V, ? extends K> supplier, Comparator<? super K> keyCmp) {
6767
ImmutableSortedArrayPropertyMapBuilder<K,V> builder = new ImmutableSortedArrayPropertyMapBuilder<>();

src/net/njcull/collections/ImmutableUniSortedArrayMapBuilder.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,11 @@ public static <K,V> ImmutableUniSortedArrayMapBuilder<K,V> newMap() {
3939
}
4040

4141
/**
42-
* Create a new builder instance that builds a new immutable uni-sorted bimap.
42+
* Create a new builder instance that builds a new immutable uni-sorted bi-map.
4343
*
4444
* @param <K> the key type of the map
4545
* @param <V> the value type of the map
46-
* @return a new builder for building a new bimap
46+
* @return a new builder for building a new bi-map
4747
*/
4848
public static <K,V> ImmutableUniSortedArrayMapBuilder<K,V> newBiMap() {
4949
ImmutableUniSortedArrayMapBuilder<K,V> builder = new ImmutableUniSortedArrayMapBuilder<>();
@@ -65,13 +65,13 @@ public static <K,V> ImmutableUniSortedArrayMapBuilder<K,V> newMapComparing(Compa
6565
}
6666

6767
/**
68-
* Create a new builder instance that builds a new immutable uni-sorted bimap
68+
* Create a new builder instance that builds a new immutable uni-sorted bi-map
6969
* using the supplied comparator for sorting the keys.
7070
*
7171
* @param <K> the key type of the map
7272
* @param <V> the value type of the map
7373
* @param cmp the key comparator for sorting the map
74-
* @return a new builder for building a new map
74+
* @return a new builder for building a new bi-map
7575
*/
7676
public static <K,V> ImmutableUniSortedArrayMapBuilder<K,V> newBiMapComparing(Comparator<? super K> cmp) {
7777
ImmutableUniSortedArrayMapBuilder<K,V> builder = new ImmutableUniSortedArrayMapBuilder<>();

0 commit comments

Comments
 (0)