// 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;
    }

    private void updateViewEnabledStates() {
        updateNumberKeysStates();
        updateAltKeysStates();
        updateBackspaceState();
        updateOkButtonState();
    }

    private void updateOkButtonState() {
        mOkButtonEnabled = mTimeParser.checkTimeValid(mAmPmState);
        mView.setOkButtonEnabled(mOkButtonEnabled);
    }

    private void updateBackspaceState() { 
        mView.setBackspaceEnabled(count() > 0);
    }

    private void updateAltKeysStates() {
        boolean enabled = false;
        if (count() == 0) {
            // No input, no access!
            enabled = false;
        } else if (count() == 1) {
            // Any of 0-9 inputted, always have access in either clock.
            enabled = true;
        } else if (count() == 2) {
            // Any 2 digits that make a valid hour for either clock are eligible for access
            final int time = getDigitsAsInteger();
            enabled = is24HourFormat() ? time <= 23 : time >= 10 && time <= 12;
// 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;

    }

    private void updateViewEnabledStates() {
        updateNumberKeysStates();
        updateAltKeysStates();
        updateBackspaceState();
        updateOkButtonState();
    }

    private void updateOkButtonState() {
        mOkButtonEnabled = mTimeParser.checkTimeValid(mAmPmState);
        mView.setOkButtonEnabled(mOkButtonEnabled);
    }

    private void updateBackspaceState() { 
        mView.setBackspaceEnabled(count() > 0);
    }

    private void updateAltKeysStates() {
        boolean enabled = false;
        if (count() == 0) {
            // No input, no access!
            enabled = false;
        } else if (count() == 1) {
            // Any of 0-9 inputted, always have access in either clock.
            enabled = true;
        } else if (count() == 2) {
            // Any 2 digits that make a valid hour for either clock are eligible for access
            final int time = getDigitsAsInteger();
            enabled = is24HourFormat() ? time <= 23 : time >= 10 && time <= 12;
        } else if (count() == 3 || count() == MAX_DIGITS) {