public static <T extends java.util.Date> T setHours(final T date, final int amount) {
        return set(date, Calendar.HOUR_OF_DAY, amount);
    }
public static < T extends java . util . Date > T setHours ( final T date , final int amount ) { return set ( date , Calendar . HOUR_OF_DAY , amount ) ; }
Copied from Apache Commons Lang under Apache License v2.
<br />

Sets the hours field to a date returning a new object.  Hours range
from  0-23.
The original {@code Date} is unchanged.

@param date  the date, not null
@param amount the amount to set
@return a new {@code Date} set with the specified value
@throws IllegalArgumentException if the date is null
@since 2.4