Disables sorting.

If the current request contains sorting criteria, it throws a SortingNotSupported exception.

@throws SortingUnsupported|JsonApiExceptionInterface
162112
public function disableSorting(): void
    {
        if ($this->request->getQueryParam("sort") !== null) {
            throw $this->exceptionFactory->createSortingUnsupportedException($this->request);
        }
    }
385838
public function sort(): void {
        $r = new Stack();
        while (!$r->isEmpty()) {
            $tmp = $this->pop();

            while ((!$r->isEmpty()) && (Comparator::lessThan($r->peek(), $tmp))) {
                $this->push($r->pop());
            }
            $r->push($tmp);
        }
        while (!$r->isEmpty()) {
            $this->push($r->pop());
        }
    }
1347541
@Deprecated
    public static <T> void sort(T[] array, int size, Comparator<? super T> comparator)
    {
        if (comparator == null)
        {
            Arrays.sort(array, 0, size); // handles case size < 2 in Java 8 ComparableTimSort
        }
        else
        {
            Arrays.sort(array, 0, size, comparator); // handles case size < 2 in Java 8 TimSort
        }
    }
1003719
public void setSorting(List<SortProperty> newSorting) {
		Validate.notNull(newSorting, "Sorting required");

		if (!sorting.equals(newSorting)) {
			sorting.clear();
			sorting.addAll(newSorting);
			selectionIndex = -1;
			clearCache();
		}
	}
443613
public void setSort(String sort) throws PageException {
	this.sort = ArrayUtil.trim(ListUtil.toStringArray(ListUtil.listToArrayRemoveEmpty(sort, ',')));
    }
213546
protected void sortPreparePriorityResources() {
        if (tc.isEntryEnabled())
            Tr.entry(tc, "sortPreparePriorityResources", _resourceObjects.toArray());

        Collections.sort(_resourceObjects, prepareComparator);

        if (tc.isEntryEnabled())
            Tr.exit(tc, "sortPreparePriorityResources", _resourceObjects.toArray());
        return;
    }
218756
public void disable() throws IOException {
        // This has to be synchronized or it can collide with the check in the task.
        synchronized (optOutLock) {
            // Check if the server owner has already set opt-out, if not, set it.
            if (!isOptOut()) {
                properties.setProperty("opt-out", "true");
                properties.store(new FileOutputStream(configurationFile), "http://mcstats.org");
            }

            // Disable Task, if it is running
            if (thread != null) {
                thread.interrupt();
                thread = null;
            }
        }
    }
1325274
protected function setActiveSorting()
    {
        $this->sSorting = Input::get('sort');
        if (empty($this->sSorting)) {
            $this->sSorting = $this->property('sorting');
        }
    }
1047402
public void throwIfUnsupportedScan(Scan scan) {
    if (scan.getFilter() != null) {
      filterAdapter.throwIfUnsupportedFilter(scan, scan.getFilter());
    }

    if (scan.getMaxResultsPerColumnFamily() != UNSET_MAX_RESULTS_PER_COLUMN_FAMILY) {
      throw new UnsupportedOperationException(
          "Limiting of max results per column family is not supported.");
    }
  }
359860
public void skipValue() throws IOException {
        skipping = true;
        try {
            int count = 0;
            do {
                JsonToken token = advance();
                if (token == JsonToken.BEGIN_ARRAY || token == JsonToken.BEGIN_OBJECT) {
                    count++;
                } else if (token == JsonToken.END_ARRAY || token == JsonToken.END_OBJECT) {
                    count--;
                }
            } while (count != 0);
        } finally {
            skipping = false;
        }
    }
520502
protected function applyCustomSorting(): void
    {
        if ($this->get('orderSRC') != '') {
            $tmp = StringUtil::deserialize($this->get('orderSRC'));

            if (!empty($tmp) && is_array($tmp)) {
                // Remove all values
                $order = array_map(
                    function () {
                    },
                    array_flip($tmp)
                );

                // Move the matching elements to their position in $arrOrder
                foreach ($this->images as $k => $v) {
                    if (array_key_exists($v['uuid'], $order)) {
                        $order[$v['uuid']] = $v;
                        unset($this->images[$k]);
                    }
                }

                // Append the left-over images at the end
                if (!empty($this->images)) {
                    $order = array_merge($order, array_values($this->images));
                }

                // Remove empty (unreplaced) entries
                $this->images = array_values(array_filter($order));
                unset($order);
            }
        }
    }
68032
public void disable() {
        enabled = false;

        // It's possible that another uncaught exception handler was installed 'over' us.
        // Whether or not it wrapped us, we have no control over what other classes do, and
        // so we can only remove ourselves if we are still the ('top most') default handler.
        // The 'enabled' boolean exists to ensure we no longer handle uncaught exceptions
        // even in the scenario where we are wrapped.
        Thread.UncaughtExceptionHandler currentHandler = Thread.getDefaultUncaughtExceptionHandler();
        if (currentHandler == this) {
            Thread.setDefaultUncaughtExceptionHandler(defaultExceptionHandler);
        }
    }
454528
function() {
			this.writeDebug('sorting',arguments);
			var _this = this,
				$mapDiv = $('#' + _this.settings.mapID),
				$sortSelect = $('#' + _this.settings.sortID);

			if ($sortSelect.length === 0) {
				return;
			}

			$sortSelect.on('change.'+pluginName, function (e) {
				e.stopPropagation();

				// Reset pagination.
				if (_this.settings.pagination === true) {
					_this.paginationChange(0);
				}

				var sortMethod,
					sortVal;

				sortMethod = (typeof $(this).find(':selected').attr('data-method') !== 'undefined') ?  $(this).find(':selected').attr('data-method') : 'distance';
				sortVal = $(this).val();

				_this.settings.sortBy.method = sortMethod;
				_this.settings.sortBy.prop = sortVal;

				// Callback
				if (_this.settings.callbackSorting) {
					_this.settings.callbackSorting.call(this, _this.settings.sortBy);
				}

				if ($mapDiv.hasClass('bh-sl-map-open')) {
					_this.mapping(mappingObj);
				}
			});
		}
23757
def set_sort(self, request):
        
        # Look for 'sort' in get request. If not available use default.
        sort_request = request.GET.get(self.sort_parameter, self.default_sort)
        if sort_request.startswith('-'):
            sort_order = '-'
            sort_field = sort_request.split('-')[1]
        else:
            sort_order = ''
            sort_field = sort_request
        # Invalid sort requests fail silently
        if not sort_field in self._allowed_sort_fields:
            sort_order = self.default_sort_order
            sort_field = self.default_sort_field
        return (sort_order, sort_field)
39569
public function disableIncludes(): void
    {
        if ($this->request->getQueryParam("include") !== null) {
            throw $this->exceptionFactory->createInclusionUnsupportedException($this->request);
        }
    }
73454
@Override
  public Task<Void> disableApiKey(@NonNull final ObjectId id) {
    return dispatcher.dispatchTask(new Callable<Void>() {
      @Override
      public Void call() {
        disableApiKeyInternal(id);
        return null;
      }
    });
  }
736382
private void sortActivities() {
        synchronized (mInstanceLock) {
            if (mActivitySorter != null && !mActivites.isEmpty()) {
                mActivitySorter.sort(mIntent, mActivites,
                        Collections.unmodifiableList(mHistoricalRecords));
                notifyChanged();
            }
        }
    }