public function raises_exception_when_given_null() { Enumeration::of(null); }
/** * Creates a new stream with an enumeration of elements * * @see xp://util.data.Enumeration * @param var $elements an iterator, iterable, generator or array * @return self * @throws lang.IllegalArgumentException if type of elements argument is incorrect */ public static function of($elements) { if (null === $elements) { return self::$EMPTY; } else { return new self(Enumeration::of($elements)); } }