Refactoring

- changed to maven
- modified hashMap and HashSet to Tree
- modified files path
This commit is contained in:
2022-08-30 11:12:50 +02:00
parent 9bda59dc7b
commit 07305b82f8
52 changed files with 1547 additions and 1486 deletions

View File

@@ -0,0 +1,18 @@
package berack96.lib.graph;
import java.util.Comparator;
/**
* Compare two arbitrary objects.<br>
* It uses the method hashCode that every object has to compare two objects.<br>
* This is a simple use
*/
public class ObjectsComparator implements Comparator<Object> {
static public final ObjectsComparator instance = new ObjectsComparator();
private ObjectsComparator(){};
@Override
public int compare(Object o1, Object o2) {
return o1.hashCode() - o2.hashCode();
}
}