public function reprioritise($entry, $newPriority, $oldPriority = false)
    {
        $changedAnything = false;
        foreach ($this->entries as $i => &$entryData) {
            if ($entry === $entryData['data'] && ($oldPriority === false || $entryData['priority'] == $oldPriority)) {
                $entryData['priority'] = $newPriority;
                $changedAnything = true;
            }
        }
        if ($changedAnything) {
            $this->sorted = false;
        }
        return $this;
    }