Finishes transition immediately.
776293
public void finishTransitionImmediately() {
    mTransitionState = TRANSITION_NONE;
    for (int i = 0; i < mLayers.length; i++) {
      mAlphas[i] = mIsLayerOn[i] ? 255 : 0;
    }
    invalidateSelf();
  }
249850
private void transition(final CallState nextState, final SipPacket msg) {
        final CallState previousState = this.currentState;
        this.currentState = nextState;
        if (previousState != nextState) {
            // don't add the same transition twice
            this.callTransitions.add(nextState);
        }
        if (logger.isInfoEnabled()) {
            logger.info("[{}] {} -> {} Event: {}", this.callId, previousState, this.currentState, msg.getInitialLine());
        }
    }
1274281
function transformWithTransition(element, transition) {
        // transition's properties:
        // - duration: Number representing the duration of the animation in milliseconds.
        // - timing: String representing the CSS timing function that controls the progress of the animation.
        // - to: The value of *element*'s transform property after the animation.
        var duration = transition.duration * _TransitionAnimation._animationFactor;
        var transitionProperty = _BaseUtils._browserStyleEquivalents["transition"].scriptName;
        element.style[transitionProperty] = duration + "ms " + transformNames.cssName + " " + transition.timing;
        element.style[transformNames.scriptName] = transition.to;

        var finish;
        return new Promise(function (c) {
            var onTransitionEnd = function (eventObject) {
                if (eventObject.target === element && eventObject.propertyName === transformNames.cssName) {
                    finish();
                }
            };

            var didFinish = false;
            finish = function () {
                if (!didFinish) {
                    _Global.clearTimeout(timeoutId);
                    element.removeEventListener(_BaseUtils._browserEventEquivalents["transitionEnd"], onTransitionEnd);
                    element.style[transitionProperty] = "";
                    didFinish = true;
                }
                c();
            };

            // Watch dog timeout
            var timeoutId = _Global.setTimeout(function () {
                timeoutId = _Global.setTimeout(finish, duration);
            }, 50);

            element.addEventListener(_BaseUtils._browserEventEquivalents["transitionEnd"], onTransitionEnd);
        }, function () {
            finish(); // On cancelation, complete the promise successfully to match PVL
        });
    }
1230322
def _finish_progress(self):
        

        if self._show_progressbar:
            if self._progressbar is None:
                self._initialize_progressbar()
            if self._progressbar is not None:
                self._progressbar.finish()

        if self._progress_callback is not None:
            self._progress_callback(100.0)
879130
function handleTransitionEnd( evt ) {
    // Make sure this event handler has not bubbled up from a child.
    if ( evt.target === evt.currentTarget ) {
      $( evt.target ).off( TRANSITIONEND, handleTransitionEnd );
      callback();
    }
  }
709581
def append_transition(self, symbol, targetset):
        """"""
        if symbol in self.transitions:
            return
        self.transitions[symbol] = targetset
1373773
def transition(line)
      @rules[@state].each do |r|
        next unless line =~ r.pattern
        @state = r.to_state
        return true
      end
      @state = :start_state
      false
    end
1167521
def streamline(self):
        """"""
        t = time.time()
        self.language.streamline()
        log.info('streamlined %s in %.02f seconds', self.__class__.__name__, time.time() - t)
318585
void optimizeTransitions()
    {
        HashMap<DFAState<T>,RangeSet> hml = new HashMap<>();
        for (Transition<DFAState<T>> t : transitions.values())
        {
            RangeSet rs = hml.get(t.getTo());
            if (rs == null)
            {
                rs = new RangeSet();
                hml.put(t.getTo(), rs);
            }
            rs.add(t.getCondition());
        }
        transitions.clear();
        for (DFAState<T> dfa : hml.keySet())
        {
            RangeSet rs = RangeSet.merge(hml.get(dfa));
            for (CharRange r : rs)
            {
                addTransition(r, dfa);
            }
        }
    }
991244
def transition_to_execute(self):
        """"""
        assert self.state in [AQStateMachineStates.add]
        self.state = AQStateMachineStates.execute
696837
def transition_to!(new_state)
      from_state = current
      self.state = new_state
      self.initial_state = new_state if from_state == DEFAULT_STATE
      true
    rescue Exception => e
      catch_error(e) || raise_transition_error(e)
    end
192772
def _transition_loop(self):
        """"""
        while self._transitions:
            start = time.time()
            for transition in self._transitions:
                transition.step()
                if transition.finished:
                    self._transitions.remove(transition)

            time_delta = time.time() - start
            sleep_time = max(0, self.MIN_STEP_TIME - time_delta)
            time.sleep(sleep_time)
1152401
def finish(self):
        
        super(InterruptibleMixin, self).finish()
        signal(SIGINT, self.original_handler)
704173
private void startNewTransition() {
        if (!hasBounds()) {
            return; // Can't start transition if the drawable has no bounds.
        }
        mCurrentTrans = mTransGen.generateNextTransition(mDrawableRect, mViewportRect);
        mElapsedTime = 0;
        mLastFrameTime = System.currentTimeMillis();
        fireTransitionStart(mCurrentTrans);
    }
605144
function _transitionComplete() {
    this.trigger( BaseTransition.END_EVENT, { target: this } );
    if ( contains( element, classObject.EXPANDED ) &&
         element.scrollHeight > previousHeight ) {
      element.style.maxHeight = element.scrollHeight + 'px';
    }
  }
635952
public void finishAppending()
  {
    checkStateTransition(this.state, SegmentState.APPENDING, SegmentState.APPEND_FINISHED);
    this.state = SegmentState.APPEND_FINISHED;
  }
318600
def _transition(self, duration, hue=None, brightness=None):
        
        # Calculate brightness steps.
        b_steps = 0
        if brightness is not None:
            b_steps = steps(self.brightness,
                            brightness, self.command_set.brightness_steps)
            b_start = self.brightness
        # Calculate hue steps.
        h_steps = 0
        if hue is not None:
            h_steps = steps(self.hue,
                            hue, self.command_set.hue_steps)
            h_start = self.hue
        # Compute ideal step amount (at least one).
        total_steps = max(b_steps, h_steps, 1)
        total_commands = b_steps + h_steps
        # Calculate wait.
        wait = self._wait(duration, total_steps, total_commands)
        # Scale down steps if no wait time.
        if wait == 0:
            b_steps, h_steps = self._scale_steps(duration, total_commands,
                                                 b_steps, h_steps)
            total_steps = max(b_steps, h_steps, 1)
        # Perform transition.
        for i in range(total_steps):
            # Brightness.
            if b_steps > 0 and i % math.ceil(total_steps/b_steps) == 0:
                self.brightness = util.transition(i, total_steps,
                                                  b_start, brightness)
            # Hue.
            if h_steps > 0 and i % math.ceil(total_steps/h_steps) == 0:
                self.hue = util.transition(i, total_steps,
                                           h_start, hue)
            # Wait.
            time.sleep(wait)