protected int computeMillisInDay() {
        // Do the time portion of the conversion.

        int millisInDay = 0;

        // Find the best set of fields specifying the time of day.  There
        // are only two possibilities here; the HOUR_OF_DAY or the
        // AM_PM and the HOUR.
        int hourOfDayStamp = stamp[HOUR_OF_DAY];
        int hourStamp = Math.max(stamp[HOUR], stamp[AM_PM]);
        int bestStamp = (hourStamp > hourOfDayStamp) ? hourStamp : hourOfDayStamp;

        // Hours
        if (bestStamp != UNSET) {
            if (bestStamp == hourOfDayStamp) {
                // Don't normalize here; let overflow bump into the next period.
                // This is consistent with how we handle other fields.
                millisInDay += internalGet(HOUR_OF_DAY);
            } else {
                // Don't normalize here; let overflow bump into the next period.
                // This is consistent with how we handle other fields.
                millisInDay += internalGet(HOUR);
                millisInDay += 12 * internalGet(AM_PM); // Default works for unset AM_PM
            }
        }

        // We use the fact that unset == 0; we start with millisInDay
        // == HOUR_OF_DAY.
        millisInDay *= 60;
        millisInDay += internalGet(MINUTE); // now have minutes
        millisInDay *= 60;
        millisInDay += internalGet(SECOND); // now have seconds
        millisInDay *= 1000;
        millisInDay += internalGet(MILLISECOND); // now have millis

        return millisInDay;
    }
protected int computeMillisInDay ( ) { int millisInDay = 0 ; int hourOfDayStamp = stamp [ HOUR_OF_DAY ] ; int hourStamp = Math . max ( stamp [ HOUR ] , stamp [ AM_PM ] ) ; int bestStamp = ( hourStamp > hourOfDayStamp ) ? hourStamp : hourOfDayStamp ; if ( bestStamp != UNSET ) { if ( bestStamp == hourOfDayStamp ) { millisInDay += internalGet ( HOUR_OF_DAY ) ; } else { millisInDay += internalGet ( HOUR ) ; millisInDay += 12 * internalGet ( AM_PM ) ; } } millisInDay *= 60 ; millisInDay += internalGet ( MINUTE ) ; millisInDay *= 60 ; millisInDay += internalGet ( SECOND ) ; millisInDay *= 1000 ; millisInDay += internalGet ( MILLISECOND ) ; return millisInDay ; }
Compute the milliseconds in the day from the fields.  This is a
value from 0 to 23:59:59.999 inclusive, unless fields are out of
range, in which case it can be an arbitrary value.  This value
reflects local zone wall time.
@deprecated This method suffers from a potential integer overflow and may be removed or
changed in a future release. See <a href="http://bugs.icu-project.org/trac/ticket/11632">
ICU ticket #11632</a> for details.