// Path: library/src/main/java/com/philliphsu/numberpadtimepicker/INumberPadTimePicker.java
// interface DialogPresenter {
//     boolean onOkButtonClick();
//     void onCancelClick();
//     void setBasePresenter(Presenter presenter);
// }
// 
// Path: library/src/main/java/com/philliphsu/numberpadtimepicker/INumberPadTimePicker.java
// interface DialogView {
//     void cancel();
// }
// 
// Path: library/src/main/java/com/philliphsu/numberpadtimepicker/INumberPadTimePicker.java
// interface Presenter {
//     void onNumberKeyClick(CharSequence numberKeyText);
//     void onAltKeyClick(CharSequence altKeyText);
//     void onBackspaceClick();
//     boolean onBackspaceLongClick();
//     boolean onOkButtonClick();
//     void onShow();
//     void onSetOkButtonCallbacks();
//     /**
//      * @param state The state to initialize the time picker with.
//      */
//     void presentState(@NonNull State state);
//     void detachView();
//     State getState();
// }
// 
// Path: library/src/main/java/com/philliphsu/numberpadtimepicker/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.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.view.View;
import android.widget.TimePicker;
import com.philliphsu.numberpadtimepicker.INumberPadTimePicker.DialogPresenter;
import com.philliphsu.numberpadtimepicker.INumberPadTimePicker.DialogView;
import com.philliphsu.numberpadtimepicker.INumberPadTimePicker.Presenter;
import static com.philliphsu.numberpadtimepicker.Preconditions.checkNotNull;
package com.philliphsu.numberpadtimepicker;




/**
 * Provides static setup methods for a {@link DialogView}.
 */
final class DialogViewInitializer {

    private DialogViewInitializer() {}

    static void setupDialogView(@NonNull DialogView dialogView, @NonNull final Context context,
            @NonNull final NumberPadTimePicker timePicker, @NonNull View okButton,
            @Nullable final OnTimeSetListener listener, boolean is24HourMode) {
        DialogPresenter presenter = new NumberPadTimePickerDialogPresenter(dialogView,
                timePicker.getPresenter());
        setupDialogView(dialogView, presenter, context, timePicker, okButton, listener,
                is24HourMode);
    }

    static void setupDialogView(@NonNull DialogView dialogView,
            @NonNull final DialogPresenter dialogPresenter, @NonNull final Context context,
            @NonNull final NumberPadTimePicker timePicker, @NonNull View okButton,
            @Nullable final OnTimeSetListener listener, boolean is24HourMode) {
// Path: library/src/main/java/com/philliphsu/numberpadtimepicker/INumberPadTimePicker.java
// interface DialogPresenter {
//     boolean onOkButtonClick();
//     void onCancelClick();
//     void setBasePresenter(Presenter presenter);
// }
// 
// Path: library/src/main/java/com/philliphsu/numberpadtimepicker/INumberPadTimePicker.java
// interface DialogView {
//     void cancel();
// }
// 
// Path: library/src/main/java/com/philliphsu/numberpadtimepicker/INumberPadTimePicker.java
// interface Presenter {
//     void onNumberKeyClick(CharSequence numberKeyText);
//     void onAltKeyClick(CharSequence altKeyText);
//     void onBackspaceClick();
//     boolean onBackspaceLongClick();
//     boolean onOkButtonClick();
//     void onShow();
//     void onSetOkButtonCallbacks();
//     /**
//      * @param state The state to initialize the time picker with.
//      */
//     void presentState(@NonNull State state);
//     void detachView();
//     State getState();
// }
// 
// Path: library/src/main/java/com/philliphsu/numberpadtimepicker/Preconditions.java
// static <T> T checkNotNull(T t) {
//     if (t == null) {
//         throw new NullPointerException();
//     }
//     return t;
// }


// Path: library/src/main/java/com/philliphsu/numberpadtimepicker/DialogViewInitializer.java
import android.app.TimePickerDialog.OnTimeSetListener;
import android.content.Context;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.view.View;
import android.widget.TimePicker;
import com.philliphsu.numberpadtimepicker.INumberPadTimePicker.DialogPresenter;
import com.philliphsu.numberpadtimepicker.INumberPadTimePicker.DialogView;
import com.philliphsu.numberpadtimepicker.INumberPadTimePicker.Presenter;
import static com.philliphsu.numberpadtimepicker.Preconditions.checkNotNull;

package com.philliphsu.numberpadtimepicker;




/**
 * Provides static setup methods for a {@link DialogView}.
 */
final class DialogViewInitializer {

    private DialogViewInitializer() {}

    static void setupDialogView(@NonNull DialogView dialogView, @NonNull final Context context,
            @NonNull final NumberPadTimePicker timePicker, @NonNull View okButton,
            @Nullable final OnTimeSetListener listener, boolean is24HourMode) {
        DialogPresenter presenter = new NumberPadTimePickerDialogPresenter(dialogView,
                timePicker.getPresenter());
        setupDialogView(dialogView, presenter, context, timePicker, okButton, listener,
                is24HourMode);
    }

    static void setupDialogView(@NonNull DialogView dialogView,
            @NonNull final DialogPresenter dialogPresenter, @NonNull final Context context,
            @NonNull final NumberPadTimePicker timePicker, @NonNull View okButton,
            @Nullable final OnTimeSetListener listener, boolean is24HourMode) {
        checkNotNull(dialogView);