Skip to content

Commit

Permalink
rename to compares
Browse files Browse the repository at this point in the history
  • Loading branch information
nejckorasa committed Nov 29, 2018
1 parent 6c1ac2e commit 5b367d8
Show file tree
Hide file tree
Showing 66 changed files with 427 additions and 414 deletions.
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2018 Nejc Korasa

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
9 changes: 6 additions & 3 deletions cmp-utils-core/pom.xml → compare-utils-core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,16 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">

<parent>
<artifactId>cmp-utils</artifactId>
<groupId>com.nkorasa</groupId>
<artifactId>compare-utils-parent</artifactId>
<groupId>com.nkorasa.compares</groupId>
<version>1.0-SNAPSHOT</version>
</parent>

<modelVersion>4.0.0</modelVersion>
<artifactId>cmp-utils-core</artifactId>
<artifactId>compare-utils-core</artifactId>

<name>Compare Utils Core</name>
<description>Library to compare objects and collections of objects</description>

<dependencies>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.nkorasa.cmp;
package com.nkorasa.compares;

import java.io.Serializable;
import java.util.ArrayList;
Expand All @@ -10,8 +10,8 @@
import java.util.function.BiFunction;
import java.util.function.Function;

import com.nkorasa.cmp.result.CmpPair;
import com.nkorasa.cmp.result.CmpResult;
import com.nkorasa.compares.result.CmpPair;
import com.nkorasa.compares.result.CmpResult;

/**
* Class to compare collections of objects
Expand Down Expand Up @@ -72,7 +72,7 @@ public static <B> CollectionCmpSameBuilder<B> ofSame(final Collection<B> baseLis
* using {@link CollectionCmpPartitioner#canPartition(Collection, Function)}. If keys collide and partitioning is not
* successful, compare result will not always be correct.
* <p>The end result contains all changes found between collections - added, updated, removed, same and different items.
* See {@link com.nkorasa.cmp.result.Diff} and {@link CmpResult}.
* See {@link com.nkorasa.compares.result.Diff} and {@link CmpResult}.
*
* @param baseKeyExtractor key extractor used to extract keys from items inside {@link #baseList}
* @param workingKeyExtractor key extractor used to extract keys from items inside {@link #workingList}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.nkorasa.cmp;
package com.nkorasa.compares;

import java.io.Serializable;
import java.util.Collection;
Expand All @@ -7,7 +7,7 @@
import java.util.function.BiFunction;
import java.util.function.Function;

import com.nkorasa.cmp.result.CmpResult;
import com.nkorasa.compares.result.CmpResult;

/**
* Builder used to configure comparing of collections of different objects performed in {@link CollectionCmp}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.nkorasa.cmp;
package com.nkorasa.compares;

import java.io.Serializable;
import java.util.Collection;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.nkorasa.cmp;
package com.nkorasa.compares;

import java.io.Serializable;
import java.util.Collection;
Expand All @@ -7,7 +7,7 @@
import java.util.function.BiFunction;
import java.util.function.Function;

import com.nkorasa.cmp.result.CmpResult;
import com.nkorasa.compares.result.CmpResult;

/**
* Builder used to configure comparing of collections of same objects performed in {@link CollectionCmp}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.nkorasa.cmp;
package com.nkorasa.compares;

import java.util.function.Function;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.nkorasa.cmp;
package com.nkorasa.compares;

import java.util.List;
import java.util.Objects;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.nkorasa.cmp;
package com.nkorasa.compares;

import java.util.Collections;
import java.util.Comparator;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.nkorasa.cmp.result;
package com.nkorasa.compares.result;

import java.io.Serializable;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.nkorasa.cmp.result;
package com.nkorasa.compares.result;

import java.util.ArrayList;
import java.util.Collection;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.nkorasa.cmp.result;
package com.nkorasa.compares.result;

/**
* Difference type between matched objects
Expand Down
22 changes: 17 additions & 5 deletions cmp-utils-tests/pom.xml → compare-utils-tests/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,36 +3,48 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">

<parent>
<artifactId>cmp-utils</artifactId>
<groupId>com.nkorasa</groupId>
<artifactId>compare-utils-parent</artifactId>
<groupId>com.nkorasa.compares</groupId>
<version>1.0-SNAPSHOT</version>
</parent>

<modelVersion>4.0.0</modelVersion>
<artifactId>cmp-utils-tests</artifactId>
<artifactId>compare-utils-tests</artifactId>

<name>Compare Utils Tests</name>
<description>Unit tests for Compare Utils</description>

<properties>
<mockito-core.version>2.21.0</mockito-core.version>
<junit-jupiter-api.version>RELEASE</junit-jupiter-api.version>
<junit.version>4.12</junit.version>
</properties>

<dependencies>

<dependency>
<groupId>com.nkorasa</groupId>
<artifactId>cmp-utils-core</artifactId>
<groupId>com.nkorasa.compares</groupId>
<artifactId>compare-utils-core</artifactId>
</dependency>

<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<version>${mockito-core.version}</version>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-api</artifactId>
<version>${junit-jupiter-api.version}</version>
<scope>test</scope>
</dependency>

<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>${junit.version}</version>
<scope>test</scope>
</dependency>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.nkorasa.cmp;
package com.nkorasa.compares;

import java.io.Serializable;
import java.util.Arrays;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package com.nkorasa.cmp;
package com.nkorasa.compares;

import java.util.Arrays;
import java.util.List;

import com.nkorasa.cmp.result.CmpResult;
import com.nkorasa.cmp.result.Diff;
import com.nkorasa.compares.result.CmpResult;
import com.nkorasa.compares.result.Diff;
import org.junit.Test;

import static org.junit.Assert.assertEquals;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.nkorasa.cmp;
package com.nkorasa.compares;

import java.util.Arrays;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.nkorasa.cmp;
package com.nkorasa.compares;

import java.util.Objects;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.nkorasa.cmp;
package com.nkorasa.compares;

import java.util.Objects;

Expand Down
20 changes: 10 additions & 10 deletions docs/allclasses-frame.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (1.8.0_152) on Thu Nov 29 15:36:55 CET 2018 -->
<!-- Generated by javadoc (1.8.0_152) on Thu Nov 29 17:30:28 CET 2018 -->
<title>All Classes</title>
<meta name="date" content="2018-11-29">
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">
Expand All @@ -12,15 +12,15 @@
<h1 class="bar">All&nbsp;Classes</h1>
<div class="indexContainer">
<ul>
<li><a href="com/nkorasa/cmp/result/CmpPair.html" title="class in com.nkorasa.cmp.result" target="classFrame">CmpPair</a></li>
<li><a href="com/nkorasa/cmp/result/CmpResult.html" title="class in com.nkorasa.cmp.result" target="classFrame">CmpResult</a></li>
<li><a href="com/nkorasa/cmp/CollectionCmp.html" title="class in com.nkorasa.cmp" target="classFrame">CollectionCmp</a></li>
<li><a href="com/nkorasa/cmp/CollectionCmpBuilder.html" title="class in com.nkorasa.cmp" target="classFrame">CollectionCmpBuilder</a></li>
<li><a href="com/nkorasa/cmp/CollectionCmpPartitioner.html" title="class in com.nkorasa.cmp" target="classFrame">CollectionCmpPartitioner</a></li>
<li><a href="com/nkorasa/cmp/CollectionCmpSameBuilder.html" title="class in com.nkorasa.cmp" target="classFrame">CollectionCmpSameBuilder</a></li>
<li><a href="com/nkorasa/cmp/result/Diff.html" title="enum in com.nkorasa.cmp.result" target="classFrame">Diff</a></li>
<li><a href="com/nkorasa/cmp/EqualityPair.html" title="class in com.nkorasa.cmp" target="classFrame">EqualityPair</a></li>
<li><a href="com/nkorasa/cmp/ObjectCmp.html" title="class in com.nkorasa.cmp" target="classFrame">ObjectCmp</a></li>
<li><a href="com/nkorasa/compares/result/CmpPair.html" title="class in com.nkorasa.compares.result" target="classFrame">CmpPair</a></li>
<li><a href="com/nkorasa/compares/result/CmpResult.html" title="class in com.nkorasa.compares.result" target="classFrame">CmpResult</a></li>
<li><a href="com/nkorasa/compares/CollectionCmp.html" title="class in com.nkorasa.compares" target="classFrame">CollectionCmp</a></li>
<li><a href="com/nkorasa/compares/CollectionCmpBuilder.html" title="class in com.nkorasa.compares" target="classFrame">CollectionCmpBuilder</a></li>
<li><a href="com/nkorasa/compares/CollectionCmpPartitioner.html" title="class in com.nkorasa.compares" target="classFrame">CollectionCmpPartitioner</a></li>
<li><a href="com/nkorasa/compares/CollectionCmpSameBuilder.html" title="class in com.nkorasa.compares" target="classFrame">CollectionCmpSameBuilder</a></li>
<li><a href="com/nkorasa/compares/result/Diff.html" title="enum in com.nkorasa.compares.result" target="classFrame">Diff</a></li>
<li><a href="com/nkorasa/compares/EqualityPair.html" title="class in com.nkorasa.compares" target="classFrame">EqualityPair</a></li>
<li><a href="com/nkorasa/compares/ObjectCmp.html" title="class in com.nkorasa.compares" target="classFrame">ObjectCmp</a></li>
</ul>
</div>
</body>
Expand Down
20 changes: 10 additions & 10 deletions docs/allclasses-noframe.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (1.8.0_152) on Thu Nov 29 15:36:55 CET 2018 -->
<!-- Generated by javadoc (1.8.0_152) on Thu Nov 29 17:30:28 CET 2018 -->
<title>All Classes</title>
<meta name="date" content="2018-11-29">
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">
Expand All @@ -12,15 +12,15 @@
<h1 class="bar">All&nbsp;Classes</h1>
<div class="indexContainer">
<ul>
<li><a href="com/nkorasa/cmp/result/CmpPair.html" title="class in com.nkorasa.cmp.result">CmpPair</a></li>
<li><a href="com/nkorasa/cmp/result/CmpResult.html" title="class in com.nkorasa.cmp.result">CmpResult</a></li>
<li><a href="com/nkorasa/cmp/CollectionCmp.html" title="class in com.nkorasa.cmp">CollectionCmp</a></li>
<li><a href="com/nkorasa/cmp/CollectionCmpBuilder.html" title="class in com.nkorasa.cmp">CollectionCmpBuilder</a></li>
<li><a href="com/nkorasa/cmp/CollectionCmpPartitioner.html" title="class in com.nkorasa.cmp">CollectionCmpPartitioner</a></li>
<li><a href="com/nkorasa/cmp/CollectionCmpSameBuilder.html" title="class in com.nkorasa.cmp">CollectionCmpSameBuilder</a></li>
<li><a href="com/nkorasa/cmp/result/Diff.html" title="enum in com.nkorasa.cmp.result">Diff</a></li>
<li><a href="com/nkorasa/cmp/EqualityPair.html" title="class in com.nkorasa.cmp">EqualityPair</a></li>
<li><a href="com/nkorasa/cmp/ObjectCmp.html" title="class in com.nkorasa.cmp">ObjectCmp</a></li>
<li><a href="com/nkorasa/compares/result/CmpPair.html" title="class in com.nkorasa.compares.result">CmpPair</a></li>
<li><a href="com/nkorasa/compares/result/CmpResult.html" title="class in com.nkorasa.compares.result">CmpResult</a></li>
<li><a href="com/nkorasa/compares/CollectionCmp.html" title="class in com.nkorasa.compares">CollectionCmp</a></li>
<li><a href="com/nkorasa/compares/CollectionCmpBuilder.html" title="class in com.nkorasa.compares">CollectionCmpBuilder</a></li>
<li><a href="com/nkorasa/compares/CollectionCmpPartitioner.html" title="class in com.nkorasa.compares">CollectionCmpPartitioner</a></li>
<li><a href="com/nkorasa/compares/CollectionCmpSameBuilder.html" title="class in com.nkorasa.compares">CollectionCmpSameBuilder</a></li>
<li><a href="com/nkorasa/compares/result/Diff.html" title="enum in com.nkorasa.compares.result">Diff</a></li>
<li><a href="com/nkorasa/compares/EqualityPair.html" title="class in com.nkorasa.compares">EqualityPair</a></li>
<li><a href="com/nkorasa/compares/ObjectCmp.html" title="class in com.nkorasa.compares">ObjectCmp</a></li>
</ul>
</div>
</body>
Expand Down
Loading

0 comments on commit 5b367d8

Please sign in to comment.