package net.squanchy.tweets.parsing;

import android.util.Patterns;

import java.util.regex.Pattern;

import net.squanchy.tweets.domain.view.UrlEntity;
import net.squanchy.tweets.model.TweetSpecialTextData;

class UrlParser extends TweetParserTemplate<UrlEntity> {

    @Override
    Pattern pattern() {
        return Patterns.WEB_URL;
    }

    @Override
    UrlEntity convertFrom(TweetSpecialTextData data) {
        return UrlEntity.create(data.text(), data.begin(), data.end());
    }
}

@@ -46,16 +46,27 @@
 android.
+support.v4.
 util.Pat
@@ -70,16 +70,22 @@
 Patterns
+Compat
 ;%0A%0Aimpor
@@ -337,16 +337,22 @@
 Patterns
+Compat
 .WEB_URL

Use PatternsCompat in UrlParser