// Path: bottomsheetpickers/src/main/java/com/philliphsu/bottomsheetpickers/time/numberpad/Preconditions.java
// static <T> T checkNotNull(T t) {
//     if (t == null) {
//         throw new NullPointerException();
//     }
//     return t;
// }


import android.app.TimePickerDialog.OnTimeSetListener;
import android.content.Context;
import android.content.DialogInterface;
import android.os.Bundle;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.view.View;
import android.widget.TimePicker;
import static com.philliphsu.bottomsheetpickers.time.numberpad.Preconditions.checkNotNull;
package com.philliphsu.bottomsheetpickers.time.numberpad;



/**
 * Handles the {@link INumberPadTimePicker.DialogView DialogView} responsibilities of a number pad time picker dialog.
 */
final class NumberPadTimePickerDialogViewDelegate implements INumberPadTimePicker.DialogView {
    private static final String KEY_DIGITS = "digits";
    // TODO: Why do we need the count?
    private static final String KEY_COUNT = "count";
    private static final String KEY_AM_PM_STATE = "am_pm_state";

    private final @NonNull DialogInterface mDelegator;
    private final @NonNull NumberPadTimePicker mTimePicker;
    private final @Nullable OnTimeSetListener mTimeSetListener;
    private final INumberPadTimePicker.DialogPresenter mPresenter;
    // Dummy TimePicker Passed to onTimeSet() callback.
    private final TimePicker mDummy;

    private View mOkButton;

    // TODO: Consider removing the okButton param because (1) the alert layout does not have it ready
    // at the time of construction and (2) the bottom sheet layout does not need this class anymore
    // to control its FAB. Keep the setOkButton() instead.
    NumberPadTimePickerDialogViewDelegate(@NonNull DialogInterface delegator,
            @NonNull Context context, @NonNull NumberPadTimePicker timePicker,
            @Nullable View okButton, @Nullable OnTimeSetListener listener, boolean is24HourMode) {
// Path: bottomsheetpickers/src/main/java/com/philliphsu/bottomsheetpickers/time/numberpad/Preconditions.java
// static <T> T checkNotNull(T t) {
//     if (t == null) {
//         throw new NullPointerException();
//     }
//     return t;
// }


// Path: bottomsheetpickers/src/main/java/com/philliphsu/bottomsheetpickers/time/numberpad/NumberPadTimePickerDialogViewDelegate.java
import android.app.TimePickerDialog.OnTimeSetListener;
import android.content.Context;
import android.content.DialogInterface;
import android.os.Bundle;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.view.View;
import android.widget.TimePicker;
import static com.philliphsu.bottomsheetpickers.time.numberpad.Preconditions.checkNotNull;

package com.philliphsu.bottomsheetpickers.time.numberpad;



/**
 * Handles the {@link INumberPadTimePicker.DialogView DialogView} responsibilities of a number pad time picker dialog.
 */
final class NumberPadTimePickerDialogViewDelegate implements INumberPadTimePicker.DialogView {
    private static final String KEY_DIGITS = "digits";
    // TODO: Why do we need the count?
    private static final String KEY_COUNT = "count";
    private static final String KEY_AM_PM_STATE = "am_pm_state";

    private final @NonNull DialogInterface mDelegator;
    private final @NonNull NumberPadTimePicker mTimePicker;
    private final @Nullable OnTimeSetListener mTimeSetListener;
    private final INumberPadTimePicker.DialogPresenter mPresenter;
    // Dummy TimePicker Passed to onTimeSet() callback.
    private final TimePicker mDummy;

    private View mOkButton;

    // TODO: Consider removing the okButton param because (1) the alert layout does not have it ready
    // at the time of construction and (2) the bottom sheet layout does not need this class anymore
    // to control its FAB. Keep the setOkButton() instead.
    NumberPadTimePickerDialogViewDelegate(@NonNull DialogInterface delegator,
            @NonNull Context context, @NonNull NumberPadTimePicker timePicker,
            @Nullable View okButton, @Nullable OnTimeSetListener listener, boolean is24HourMode) {
        mDelegator = checkNotNull(delegator);