public function __construct(\SplFixedArray $key_value_pairs)
{
foreach ($key_value_pairs as $keyValuePair) {
if (false === $keyValuePair instanceof KeyValuePair) {
$type = \is_object($keyValuePair) ? \get_class($keyValuePair) : \gettype($keyValuePair);
throw new \InvalidArgumentException(\sprintf('Passed SplFixedArray object must contains "KeyValuePair" objects only. "%s" given.', $type));
}
}
$this->items = $key_value_pairs;
}