public function subList(\int $fromIndex, \int $toIndex, $fromInclusive = true, $toInclusive = false) { return $this->list->subList($fromIndex, $toIndex, $fromInclusive, $toInclusive); }
/** * 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()); } }