package com.github.windsekirun.naraetextview;

import java.util.regex.Pattern;

/**
 * NaraeTextView
 * class: BuildPattern
 * Created by IrenSekirun on 15. 8. 5..
 */
public class BuildPattern {

    public enum PatternKind {
        HASHTAG, USERNAME, HTTP
    }
    
    public Pattern getPattern(PatternKind pk) {
        Pattern toBuild = null;
        switch (pk) {
            case HASHTAG:
                toBuild = Pattern.compile("(https?://)?([\\da-zA-Z\\.-]+)\\.([a-zA-Z])([/\\w\\.-_]*)*/?");
                break;
            case USERNAME:
                toBuild = Pattern.compile("@([0-9a-zA-Z_])+");
                break;
            case HTTP:
                toBuild = Pattern.compile("#([0-9a-zA-Z가-힣_])+");
                break;
        }
        return toBuild;
    }
}

@@ -189,16 +189,20 @@
 ttern %7B%0A
+    
 %0A    pub
@@ -209,78 +209,12 @@
 lic 
-enum PatternKind %7B%0A        HASHTAG, USERNAME, HTTP%0A    %7D%0A    %0A    publ
+stat
 ic P

Update BuildPattern - add static methods