View Javadoc
1   package org.kuali.common.util.condition;
2   
3   import java.util.Date;
4   
5   import com.google.common.base.Preconditions;
6   
7   public abstract class AbstractDateCondition implements Condition {
8   
9   	public AbstractDateCondition(Date date) {
10  		this(date.getTime());
11  	}
12  
13  	public AbstractDateCondition(long millis) {
14  		Preconditions.checkArgument(millis >= 0, "'millis' must be >= 0");
15  		this.millis = millis;
16  	}
17  
18  	private final long millis;
19  
20  	public long getMillis() {
21  		return millis;
22  	}
23  
24  	public Date getDate() {
25  		return new Date(millis);
26  	}
27  
28  }