Search in sources :

Example 1 with Future

use of javax.validation.constraints.Future in project javaee7-samples by javaee-samples.

the class MyBean method showDate.

@Future
public Date showDate(boolean correct) {
    Calendar cal = Calendar.getInstance();
    cal.add(Calendar.DAY_OF_MONTH, correct ? 5 : -5);
    return cal.getTime();
}
Also used : Calendar(java.util.Calendar) Future(javax.validation.constraints.Future)

Aggregations

Calendar (java.util.Calendar)1 Future (javax.validation.constraints.Future)1