public static function rangeFromString($range)
    {
        $result = null;
        if ($result === null) {
            $result = Range\Subnet::fromString($range);
        }
        if ($result === null) {
            $result = Range\Pattern::fromString($range);
        }
        if ($result === null) {
            $result = Range\Single::fromString($range);
        }

        return $result;
    }