public function clear()
{
if ($this->getReadOnly()) {
throw new TInvalidOperationException('list_readonly', get_class($this));
}
$d = array_reverse($this->_d, true);
foreach ($this->_d as $priority => $items) {
for ($index = count($items) - 1; $index >= 0; $index--) {
$this->removeAtIndexInPriority($index, $priority);
}
unset($this->_d[$priority]);
}
}