ItEr13S15ProbasModuloRecursosItEr12S10: Improving Criterion#toString method.
This commit is contained in:
parent
f5d9b8395e
commit
62baa4d37f
1 changed files with 3 additions and 4 deletions
|
|
@ -60,9 +60,8 @@ public class Criterion implements ICriterion {
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isSatisfiedBy(Resource resource, Date start, Date end) {
|
public boolean isSatisfiedBy(Resource resource, Date start, Date end) {
|
||||||
return !resource.query().from(this)
|
return !resource.query().from(this).enforcedInAll(
|
||||||
.enforcedInAll(Interval.range(start, end)).result()
|
Interval.range(start, end)).result().isEmpty();
|
||||||
.isEmpty();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getName() {
|
public String getName() {
|
||||||
|
|
@ -96,6 +95,6 @@ public class Criterion implements ICriterion {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return new ToStringBuilder(this).getStringBuffer().toString();
|
return ToStringBuilder.reflectionToString(this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue