3535 * @param <E>
3636 * the type of elements maintained by the created set or keys by the created map.
3737 */
38- public class EqualityTransformingBuilder <E > {
38+ public class EqualityTransformingCollectionBuilder <E > {
3939
4040 private final Class <? super E > outerKeyTypeToken ;
4141 private BiPredicate <? super E , ? super E > equals ;
4242 private ToIntFunction <? super E > hash ;
4343
44- private EqualityTransformingBuilder (Class <? super E > outerKeyTypeToken ) {
44+ private EqualityTransformingCollectionBuilder (Class <? super E > outerKeyTypeToken ) {
4545 this .outerKeyTypeToken = outerKeyTypeToken ;
4646 // note that the methods from 'Objects' already implement the contract for null-safety
4747 // imposed by the transforming set and map
@@ -65,8 +65,8 @@ private EqualityTransformingBuilder(Class<? super E> outerKeyTypeToken) {
6565 * the type of elements contained in the set created by the builder
6666 * @return a new builder
6767 */
68- public static <E > EqualityTransformingBuilder <E > forUnspecifiedKeyType () {
69- return new EqualityTransformingBuilder <>(Object .class );
68+ public static <E > EqualityTransformingCollectionBuilder <E > forUnspecifiedKeyType () {
69+ return new EqualityTransformingCollectionBuilder <>(Object .class );
7070 }
7171
7272 /**
@@ -80,17 +80,17 @@ public static <E> EqualityTransformingBuilder<E> forUnspecifiedKeyType() {
8080 * a type token for the elements contained in the set created by the builder
8181 * @return a new builder
8282 */
83- public static <E > EqualityTransformingBuilder <E > forKeyType (Class <? super E > keyTypeToken ) {
83+ public static <E > EqualityTransformingCollectionBuilder <E > forKeyType (Class <? super E > keyTypeToken ) {
8484 Objects .requireNonNull (keyTypeToken , "The argument 'keyTypeToken' must not be null." );
85- return new EqualityTransformingBuilder <>(keyTypeToken );
85+ return new EqualityTransformingCollectionBuilder <>(keyTypeToken );
8686 }
8787
8888 /**
8989 * @param equals
9090 * a function determining equality of keys; might be called with null keys
9191 * @return this builder
9292 */
93- public EqualityTransformingBuilder <E > withEqualsHandlingNull (BiPredicate <? super E , ? super E > equals ) {
93+ public EqualityTransformingCollectionBuilder <E > withEqualsHandlingNull (BiPredicate <? super E , ? super E > equals ) {
9494 Objects .requireNonNull (equals , "The argument 'equals' must not be null." );
9595 this .equals = equals ;
9696 return this ;
@@ -101,7 +101,7 @@ public EqualityTransformingBuilder<E> withEqualsHandlingNull(BiPredicate<? super
101101 * a function determining equality of keys; will not be called with null keys
102102 * @return this builder
103103 */
104- public EqualityTransformingBuilder <E > withEquals (BiPredicate <? super E , ? super E > equals ) {
104+ public EqualityTransformingCollectionBuilder <E > withEquals (BiPredicate <? super E , ? super E > equals ) {
105105 Objects .requireNonNull (equals , "The argument 'equals' must not be null." );
106106 return withEqualsHandlingNull (makeNullSafe (equals ));
107107 }
@@ -122,7 +122,7 @@ public EqualityTransformingBuilder<E> withEquals(BiPredicate<? super E, ? super
122122 * a function computing the hash code of a key; might be called with null keys
123123 * @return this builder
124124 */
125- public EqualityTransformingBuilder <E > withHashHandlingNull (ToIntFunction <? super E > hash ) {
125+ public EqualityTransformingCollectionBuilder <E > withHashHandlingNull (ToIntFunction <? super E > hash ) {
126126 Objects .requireNonNull (hash , "The argument 'hash' must not be null." );
127127 this .hash = hash ;
128128 return this ;
@@ -133,7 +133,7 @@ public EqualityTransformingBuilder<E> withHashHandlingNull(ToIntFunction<? super
133133 * a function computing the hash code of a key; will not be called with null keys
134134 * @return this builder
135135 */
136- public EqualityTransformingBuilder <E > withHash (ToIntFunction <? super E > hash ) {
136+ public EqualityTransformingCollectionBuilder <E > withHash (ToIntFunction <? super E > hash ) {
137137 Objects .requireNonNull (hash , "The argument 'hash' must not be null." );
138138 return withHashHandlingNull (makeNullSafe (hash ));
139139 }
0 commit comments