public function set(\int $index, \blaze\lang\Reflectable $obj) { return $this->list->set($index, $obj); }
/** * Swaps the element from posA with posB */ public static function swap(ListI $list, \int $posA, \int $posB) { if ($posA >= 0 && $posA < $list->count() && $posB >= 0 && $posB < $list->count()) { $h = $list->set($posA, $list->get($posB)); $list->set($posB, $h); } else { throw new \blaze\lang\IndexOutOfBoundsException('posA: ' . $posA . 'posB:' . $posB . 'size:' . $list->count()); } }