Added javadoc.
Signed-off-by: Kai Zimmermann <kai.zimmermann@bosch-si.com>
This commit is contained in:
@@ -36,6 +36,13 @@ public final class DurationHelper {
|
|||||||
this.max = max;
|
this.max = max;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Checks if the requested duration is in the defined min/max range.
|
||||||
|
*
|
||||||
|
* @param duration
|
||||||
|
* to checked
|
||||||
|
* @return <code>true</code> if in time range
|
||||||
|
*/
|
||||||
public boolean isWithinRange(final Duration duration) {
|
public boolean isWithinRange(final Duration duration) {
|
||||||
return duration.compareTo(min) >= 0 && duration.compareTo(max) <= 0;
|
return duration.compareTo(min) >= 0 && duration.compareTo(max) <= 0;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user