1414 * limitations under the License.
1515 */
1616
17- package de .danielbechler .diff .comparison ;
17+ package de .danielbechler .diff .identity ;
1818
1919import de .danielbechler .diff .inclusion .ValueNode ;
2020import de .danielbechler .diff .node .DiffNode ;
2121import de .danielbechler .diff .path .NodePath ;
2222
23- public class CollectionComparisonService implements IdentityStrategyResolver
23+ class CollectionItemIdentityService implements IdentityStrategyResolver
2424{
2525 private final ValueNode <IdentityStrategy > nodePathIdentityStrategies ;
2626 private final TypePropertyIdentityStrategyResolver typePropertyIdentityStrategyResolver ;
27- private final ComparisonConfigurer comparisonConfigurer ;
27+ private final IdentityConfigurer identityConfigurer ;
2828
29- public CollectionComparisonService (final ComparisonConfigurer comparisonConfigurer )
29+ public CollectionItemIdentityService (final IdentityConfigurer identityConfigurer )
3030 {
31- this .comparisonConfigurer = comparisonConfigurer ;
31+ this .identityConfigurer = identityConfigurer ;
3232 this .nodePathIdentityStrategies = new ValueNode <IdentityStrategy >();
3333 this .typePropertyIdentityStrategyResolver = new TypePropertyIdentityStrategyResolver ();
3434 }
@@ -48,17 +48,17 @@ public IdentityStrategy resolveIdentityStrategy(final DiffNode node)
4848 return EqualsIdentityStrategy .getInstance ();
4949 }
5050
51- public ComparisonConfigurer .OfCollectionItems ofCollectionItems (final NodePath nodePath )
51+ public IdentityConfigurer .OfCollectionItems ofCollectionItems (final NodePath nodePath )
5252 {
5353 return new OfCollectionItemsByNodePath (nodePath );
5454 }
5555
56- public ComparisonConfigurer .OfCollectionItems ofCollectionItems (final Class <?> type , final String propertyName )
56+ public IdentityConfigurer .OfCollectionItems ofCollectionItems (final Class <?> type , final String propertyName )
5757 {
5858 return new OfCollectionItemsByTypeProperty (type , propertyName );
5959 }
6060
61- private class OfCollectionItemsByNodePath implements ComparisonConfigurer .OfCollectionItems
61+ private class OfCollectionItemsByNodePath implements IdentityConfigurer .OfCollectionItems
6262 {
6363 private final NodePath nodePath ;
6464
@@ -67,14 +67,14 @@ public OfCollectionItemsByNodePath(final NodePath nodePath)
6767 this .nodePath = nodePath ;
6868 }
6969
70- public ComparisonConfigurer toUse (final IdentityStrategy identityStrategy )
70+ public IdentityConfigurer via (final IdentityStrategy identityStrategy )
7171 {
7272 nodePathIdentityStrategies .getNodeForPath (nodePath ).setValue (identityStrategy );
73- return comparisonConfigurer ;
73+ return identityConfigurer ;
7474 }
7575 }
7676
77- private class OfCollectionItemsByTypeProperty implements ComparisonConfigurer .OfCollectionItems
77+ private class OfCollectionItemsByTypeProperty implements IdentityConfigurer .OfCollectionItems
7878 {
7979 private final Class <?> type ;
8080 private final String propertyName ;
@@ -85,10 +85,10 @@ public OfCollectionItemsByTypeProperty(final Class<?> type, final String propert
8585 this .propertyName = propertyName ;
8686 }
8787
88- public ComparisonConfigurer toUse (final IdentityStrategy identityStrategy )
88+ public IdentityConfigurer via (final IdentityStrategy identityStrategy )
8989 {
9090 typePropertyIdentityStrategyResolver .setStrategy (identityStrategy , type , propertyName );
91- return comparisonConfigurer ;
91+ return identityConfigurer ;
9292 }
9393 }
9494}
0 commit comments