nafis nibir před 6 roky
rodič
revize
c33ad46fac
1 změnil soubory, kde provedl 18 přidání a 0 odebrání
  1. 18
    0
      src/main/java/HamletRegex.java

+ 18
- 0
src/main/java/HamletRegex.java Zobrazit soubor

4
 public class HamletRegex {
4
 public class HamletRegex {
5
     Pattern horatioPat = Pattern.compile("HORATIO", Pattern.CASE_INSENSITIVE);
5
     Pattern horatioPat = Pattern.compile("HORATIO", Pattern.CASE_INSENSITIVE);
6
     Pattern hamletPat = Pattern.compile("HAMLET", Pattern.CASE_INSENSITIVE);
6
     Pattern hamletPat = Pattern.compile("HAMLET", Pattern.CASE_INSENSITIVE);
7
+    String completelyReplaced;
7
 
8
 
8
 
9
 
10
+    public static void main(String[] args) {
11
+        HamletParser hamletParser = new HamletParser();
12
+        HamletRegex ham = new HamletRegex(hamletParser.getHamletData());
13
+        System.out.println(ham.getComplete());
14
+    }
15
+
16
+    public String getComplete(){
17
+        return completelyReplaced;
18
+    }
19
+    public HamletRegex(String hamlet){
20
+        completelyReplaced= hamletToLeon(horatioToTariq(hamlet));
21
+    }
22
+
23
+    public HamletRegex(){
24
+
25
+    }
26
+
9
     public String hamletToLeon(String hamlet){
27
     public String hamletToLeon(String hamlet){
10
 
28
 
11
         return hamletToLeonLower(hamletToLeonUpper(hamlet));
29
         return hamletToLeonLower(hamletToLeonUpper(hamlet));