// Path: library/src/main/java/com/philliphsu/numberpadtimepicker/DigitwiseTimeModel.java
// static final int MAX_DIGITS = 4;
// 
// 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.support.annotation.NonNull;
import static com.philliphsu.numberpadtimepicker.AmPmState.AM;
import static com.philliphsu.numberpadtimepicker.AmPmState.HRS_24;
import static com.philliphsu.numberpadtimepicker.AmPmState.PM;
import static com.philliphsu.numberpadtimepicker.AmPmState.UNSPECIFIED;
import static com.philliphsu.numberpadtimepicker.DigitwiseTimeModel.MAX_DIGITS;
import static com.philliphsu.numberpadtimepicker.Preconditions.checkNotNull;
package com.philliphsu.numberpadtimepicker;



class NumberPadTimePickerPresenter implements INumberPadTimePicker.Presenter,
        DigitwiseTimeModel.OnInputChangeListener {
    private static final int MAX_CHARS = 5;  // 4 digits + time separator

    private final DigitwiseTimeModel mTimeModel = new DigitwiseTimeModel(this);
    private final DigitwiseTimeParser mTimeParser = new DigitwiseTimeParser(mTimeModel);
    private final StringBuilder mFormattedInput = new StringBuilder(MAX_CHARS);
    private final String[] mAltTexts = new String[2];

    private final @NonNull LocaleModel mLocaleModel;
    private final ButtonTextModel mTextModel;
    private final String mTimeSeparator;
    private final boolean mIs24HourMode;

    private INumberPadTimePicker.View mView;

    private @AmPmState int mAmPmState = UNSPECIFIED;
    private boolean mOkButtonEnabled;

    NumberPadTimePickerPresenter(@NonNull INumberPadTimePicker.View view,
                                 @NonNull LocaleModel localeModel,
                                 boolean is24HourMode) {
// Path: library/src/main/java/com/philliphsu/numberpadtimepicker/DigitwiseTimeModel.java
// static final int MAX_DIGITS = 4;
// 
// 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/NumberPadTimePickerPresenter.java
import android.support.annotation.NonNull;
import static com.philliphsu.numberpadtimepicker.AmPmState.AM;
import static com.philliphsu.numberpadtimepicker.AmPmState.HRS_24;
import static com.philliphsu.numberpadtimepicker.AmPmState.PM;
import static com.philliphsu.numberpadtimepicker.AmPmState.UNSPECIFIED;
import static com.philliphsu.numberpadtimepicker.DigitwiseTimeModel.MAX_DIGITS;
import static com.philliphsu.numberpadtimepicker.Preconditions.checkNotNull;

package com.philliphsu.numberpadtimepicker;



class NumberPadTimePickerPresenter implements INumberPadTimePicker.Presenter,
        DigitwiseTimeModel.OnInputChangeListener {
    private static final int MAX_CHARS = 5;  // 4 digits + time separator

    private final DigitwiseTimeModel mTimeModel = new DigitwiseTimeModel(this);
    private final DigitwiseTimeParser mTimeParser = new DigitwiseTimeParser(mTimeModel);
    private final StringBuilder mFormattedInput = new StringBuilder(MAX_CHARS);
    private final String[] mAltTexts = new String[2];

    private final @NonNull LocaleModel mLocaleModel;
    private final ButtonTextModel mTextModel;
    private final String mTimeSeparator;
    private final boolean mIs24HourMode;

    private INumberPadTimePicker.View mView;

    private @AmPmState int mAmPmState = UNSPECIFIED;
    private boolean mOkButtonEnabled;

    NumberPadTimePickerPresenter(@NonNull INumberPadTimePicker.View view,
                                 @NonNull LocaleModel localeModel,
                                 boolean is24HourMode) {
        mView = checkNotNull(view);