Better toString() and logging

This commit is contained in:
Reinhard Pointner 2016-05-03 19:28:33 +08:00
parent 159add90c5
commit 23872ff894
2 changed files with 14 additions and 0 deletions

View File

@ -1,5 +1,7 @@
package net.filebot.similarity;
import static java.util.Arrays.*;
public class MetricAvg implements SimilarityMetric {
private final SimilarityMetric[] metrics;
@ -21,4 +23,9 @@ public class MetricAvg implements SimilarityMetric {
return f / metrics.length;
}
@Override
public String toString() {
return getClass().getSimpleName() + ' ' + asList(metrics);
}
}

View File

@ -1,5 +1,7 @@
package net.filebot.similarity;
import static java.util.Arrays.*;
public class MetricCascade implements SimilarityMetric {
private final SimilarityMetric[] cascade;
@ -26,4 +28,9 @@ public class MetricCascade implements SimilarityMetric {
return f;
}
@Override
public String toString() {
return getClass().getSimpleName() + ' ' + asList(cascade);
}
}