public static Date getInstance(final java.util.Date date, final Value type) {
        if (Value.DATE.equals(type)) {
            return new Date(date);
        }
        return new DateTime(date);
    }
public static Date getInstance ( final java . util . Date date , final Value type ) { if ( Value . DATE . equals ( type ) ) { return new Date ( date ) ; } return new DateTime ( date ) ; }
Returns a new date instance of the specified type. If no type is
specified a DateTime instance is returned.
@param date a seed Java date instance
@param type the type of date instance
@return an instance of <code>net.fortuna.ical4j.model.Date</code>