// 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.content.Context;
import android.util.AttributeSet;
import android.view.View;
import android.widget.TextView;
import static com.philliphsu.numberpadtimepicker.Preconditions.checkNotNull;
package com.philliphsu.numberpadtimepicker;



/**
 * Component that install {@link NumberPadTimePicker#LAYOUT_ALERT alert dialog} functionality
 * to a {@link NumberPadTimePicker}.
 */
final class NumberPadTimePickerAlertComponent extends
        NumberPadTimePicker.NumberPadTimePickerComponent {

    private final TextView mCancelButton;

    NumberPadTimePickerAlertComponent(NumberPadTimePicker timePicker, Context context,
            AttributeSet attrs, int defStyleAttr, int defStyleRes) {
        super(timePicker, context, attrs, defStyleAttr, defStyleRes);
        mCancelButton = (TextView) timePicker.findViewById(R.id.nptp_button2);

// 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/NumberPadTimePickerAlertComponent.java
import android.content.Context;
import android.util.AttributeSet;
import android.view.View;
import android.widget.TextView;
import static com.philliphsu.numberpadtimepicker.Preconditions.checkNotNull;

package com.philliphsu.numberpadtimepicker;



/**
 * Component that install {@link NumberPadTimePicker#LAYOUT_ALERT alert dialog} functionality
 * to a {@link NumberPadTimePicker}.
 */
final class NumberPadTimePickerAlertComponent extends
        NumberPadTimePicker.NumberPadTimePickerComponent {

    private final TextView mCancelButton;

    NumberPadTimePickerAlertComponent(NumberPadTimePicker timePicker, Context context,
            AttributeSet attrs, int defStyleAttr, int defStyleRes) {
        super(timePicker, context, attrs, defStyleAttr, defStyleRes);
        mCancelButton = (TextView) timePicker.findViewById(R.id.nptp_button2);

        ((TextView) checkNotNull(mOkButton)).setText(android.R.string.ok);