ItEr13S15ProbasModuloRecursosItEr12S10: Improving Criterion#toString method.

This commit is contained in:
Óscar González Fernández 2009-06-25 17:20:29 +02:00 committed by Javier Moran Rua
parent f5d9b8395e
commit 62baa4d37f

View file

@ -60,9 +60,8 @@ public class Criterion implements ICriterion {
}
public boolean isSatisfiedBy(Resource resource, Date start, Date end) {
return !resource.query().from(this)
.enforcedInAll(Interval.range(start, end)).result()
.isEmpty();
return !resource.query().from(this).enforcedInAll(
Interval.range(start, end)).result().isEmpty();
}
public String getName() {
@ -96,6 +95,6 @@ public class Criterion implements ICriterion {
@Override
public String toString() {
return new ToStringBuilder(this).getStringBuffer().toString();
return ToStringBuilder.reflectionToString(this);
}
}