View Javadoc

1   package org.kuali.common.util.condition;
2   
3   import org.kuali.common.util.Assert;
4   
5   public final class AfterTimeCondition implements Condition {
6   
7   	public AfterTimeCondition(long targetTimeInMillis) {
8   		Assert.notNegative(targetTimeInMillis);
9   		this.targetTimeInMillis = targetTimeInMillis;
10  	}
11  
12  	private final long targetTimeInMillis;
13  
14  	@Override
15  	public boolean isTrue() {
16  		return System.currentTimeMillis() > targetTimeInMillis;
17  	}
18  
19  	public long getTargetTimeInMillis() {
20  		return targetTimeInMillis;
21  	}
22  
23  }