private Timepoint roundToValidTime ( Timepoint newSelection , int currentItemShowing ) { switch ( currentItemShowing ) { case HOUR_INDEX : return mController . roundToNearest ( newSelection , null ) ; case MINUTE_INDEX : return mController . roundToNearest ( newSelection , Timepoint . TYPE . HOUR ) ; default : return mController . roundToNearest ( newSelection , Timepoint . TYPE . MINUTE ) ; } }
Snap the input to a selectable value