Skip to content

Commit c220969

Browse files
committed
112 refactor javadoc
1 parent 5ad2e00 commit c220969

File tree

1 file changed

+51
-65
lines changed
  • 3-0-java-core/3-6-3-crazy-regex/src/main/java/com/bobocode/se

1 file changed

+51
-65
lines changed

3-0-java-core/3-6-3-crazy-regex/src/main/java/com/bobocode/se/CrazyRegex.java

Lines changed: 51 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -13,220 +13,204 @@
1313
public class CrazyRegex {
1414

1515
/**
16-
* Create Pattern that accepts String with regex inside and can
17-
* find all words "Curiosity" in text
16+
* A Pattern that that finds all words "Curiosity" in text
1817
*
19-
* @return Pattern with regex expression
18+
* @return a pattern that looks for the word "Curiosity"
2019
*/
2120
public Pattern findSpecificWord() {
2221
throw new ExerciseNotCompletedException();
2322
}
2423

2524
/**
26-
* Create Pattern that accepts String with regex inside and can
27-
* find first word in text
25+
* A Pattern that finds first word in text
2826
*
29-
* @return Pattern with regex expression
27+
* @return a pattern that looks for the first word in text
3028
*/
3129
public Pattern findFirstWord() {
3230
throw new ExerciseNotCompletedException();
3331
}
3432

3533
/**
36-
* Create Pattern that accepts String with regex inside and can
37-
* find last word in text
34+
* A Pattern that finds last word in text
3835
*
39-
* @return Pattern with regex expression
36+
* @return a pattern that looks for the last word in text
4037
*/
4138
public Pattern findLastWord() {
4239
throw new ExerciseNotCompletedException();
4340
}
4441

4542
/**
46-
* Create Pattern that accepts String with regex inside and can
47-
* find all numbers in text
43+
* A Pattern that finds all numbers in text. When we have "555-555", "(555)555" and "30th" in text
44+
* our pattern must grab all that numbers:
45+
* "555" - four times, and one "30"
4846
*
49-
* @return Pattern with regex expression
47+
* @return a pattern that looks for numbers
5048
*/
5149
public Pattern findAllNumbers() {
5250
throw new ExerciseNotCompletedException();
5351
}
5452

5553
/**
56-
* Create Pattern that accepts String with regex inside and can
57-
* can find all dates like: 1971-11-23
54+
* A Pattern that finds all dates. For instance: "1971-11-23"
5855
*
59-
* @return Pattern with regex expression
56+
* @return a pattern that looks for dates
6057
*/
6158
public Pattern findDates() {
6259
throw new ExerciseNotCompletedException();
6360
}
6461

6562
/**
66-
* Create Pattern that accepts String with regex inside and can
67-
* different variations of word 'color'. We are looking for:
68-
* 'color', 'colour', 'colors', 'colours'
63+
* A Pattern that finds different variations of word "color".
64+
* We are looking for: "color", "colour", "colors", "colours"
6965
*
70-
* @return Pattern with regex expression
66+
* @return a pattern that looks for different variations of word "color"
7167
*/
7268
public Pattern findDifferentSpellingsOfColor() {
7369
throw new ExerciseNotCompletedException();
7470
}
7571

7672
/**
77-
* Create Pattern that accepts String with regex inside and can
78-
* can find all zip codes in text
73+
* A Pattern that finds all zip codes in text.
74+
* Zip code is a 5-digit number without any characters or special symbols.
75+
* For example: 72300
7976
*
80-
* @return Pattern with regex expression
77+
* @return a pattern that looks for zip codes
8178
*/
8279
public Pattern findZipCodes() {
8380
throw new ExerciseNotCompletedException();
8481
}
8582

8683
/**
87-
* Create Pattern that accepts String with regex inside and can
88-
* find different variations of word 'link', We are looking for:
89-
* 'lynk', 'link', 'l nk', 'l(nk'
84+
* A Pattern that finds different variations of word "link".
85+
* We are looking for: "lynk", "link", "l nk", "l(nk"
9086
*
91-
* @return Pattern with regex expression
87+
* @return a pattern that looks for different variations of word "link"
9288
*/
9389
public Pattern findDifferentSpellingsOfLink() {
9490
throw new ExerciseNotCompletedException();
9591
}
9692

9793
/**
98-
* Create Pattern that accepts String with regex inside and can
99-
* find phone number. For example: 555-555-5555
94+
* A Pattern that finds phone numbers.
95+
* For example: "555-555-5555"
10096
*
101-
* @return Pattern with regex expression
97+
* @return a pattern that looks for phone numbers
10298
*/
10399
public Pattern findSimplePhoneNumber() {
104100
throw new ExerciseNotCompletedException();
105101
}
106102

107103
/**
108-
* Create Pattern that accepts String with regex inside and can
109-
* can find numbers with following requirements:
104+
* A Pattern that finds numbers with following requirements:
110105
* - inside the number can be only digits from 0 to 5
111106
* - length 3
112107
*
113-
* @return Pattern with regex expression
108+
* @return a pattern that looks for numbers with length 3 and digits from 0 to 5 in the middle
114109
*/
115110
public Pattern findNumbersFromZeroToFiveWithLengthThree() {
116111
throw new ExerciseNotCompletedException();
117112
}
118113

119114
/**
120-
* Create Pattern that accepts String with regex inside and can
121-
* find all words in text that have length 5
115+
* A Pattern that finds all words in text that have length 5
122116
*
123-
* @return Pattern with regex expression
117+
* @return a pattern that looks for the words that have length 5
124118
*/
125119
public Pattern findAllWordsWithFiveLength() {
126120
throw new ExerciseNotCompletedException();
127121
}
128122

129123
/**
130-
* Create Pattern that accepts String with regex inside and can
131-
* find words and numbers with following constraints:
124+
* A Pattern that finds words and numbers with following constraints:
132125
* - not shorter than two symbols
133126
* - not longer than three symbols
134127
*
135-
* @return Pattern with regex expression
128+
* @return a pattern that looks for words and numbers that not shorter 2 and not longer 3
136129
*/
137130
public Pattern findAllLettersAndDigitsWithLengthThree() {
138131
throw new ExerciseNotCompletedException();
139132
}
140133

141134
/**
142-
* Create Pattern that accepts String with regex inside and can
143-
* find all words that begin with capital letter
135+
* A Pattern that finds all words that begin with capital letter
144136
*
145-
* @return Pattern with regex expression
137+
* @return a pattern that looks for the words that begin with capital letter
146138
*/
147139
public Pattern findAllWordsWhichBeginWithCapitalLetter() {
148140
throw new ExerciseNotCompletedException();
149141
}
150142

151143
/**
152-
* Create Pattern that accepts String with regex inside and can
153-
* find only the following abbreviation:
144+
* A Pattern that finds only the following abbreviation:
154145
* - AK, AL, AR, AZ, CA, CO, CT, PR, PA, PD
155146
*
156-
* @return Pattern with regex expression
147+
* @return a pattern that looks for the abbreviations above
157148
*/
158149
public Pattern findAbbreviation() {
159150
throw new ExerciseNotCompletedException();
160151
}
161152

162153
/**
163-
* Create Pattern that accepts String with regex inside and can
164-
* find all open braces
154+
* A Pattern that finds all open braces
165155
*
166-
* @return Pattern with regex expression
156+
* @return a pattern that looks for all open braces
167157
*/
168158
public Pattern findAllOpenBraces() {
169159
throw new ExerciseNotCompletedException();
170160
}
171161

172162
/**
173-
* Create Pattern that accepts String with regex inside and can
174-
* find everything inside []
163+
* A Pattern that finds everything inside []
175164
*
176-
* @return Pattern with regex expression
165+
* @return a pattern that looks for everything inside []
177166
*/
178167
public Pattern findOnlyResources() {
179168
throw new ExerciseNotCompletedException();
180169
}
181170

182171
/**
183-
* Create Pattern that accepts String with regex inside and can
184-
* find all http links inside ()
172+
* A Pattern that finds all https links in note.txt
185173
*
186-
* @return Pattern with regex expression
174+
* @return a pattern that looks for all https links in note.txt
187175
*/
188176
public Pattern findOnlyLinksInNote() {
189177
throw new ExerciseNotCompletedException();
190178
}
191179

192180
/**
193-
* Create Pattern that accepts String with regex inside and can
194-
* all http links
181+
* A Pattern that finds all http links in nasa.json
195182
*
196-
* @return Pattern with regex expression
183+
* @return a pattern that looks for all http links in nasa.json
197184
*/
198185
public Pattern findOnlyLinksInJson() {
199186
throw new ExerciseNotCompletedException();
200187
}
201188

202189
/**
203-
* Create Pattern that accepts String with regex inside and can
204-
* find all .com, .net and .edu emails
190+
* A Pattern that finds all .com, .net and .edu emails
205191
*
206-
* @return Pattern with regex expression
192+
* @return a pattern that looks for all .com, .net and .edu emails
207193
*/
208194
public Pattern findAllEmails() {
209195
throw new ExerciseNotCompletedException();
210196
}
211197

212198
/**
213-
* Create Pattern that accepts String with regex inside and can
214-
* can find the following examples of phone numbers:
199+
* A Pattern that finds the following examples of phone numbers:
215200
* - 555-555-5555
216201
* - 555.555.5555
217202
* - (555)555-5555
218203
*
219-
* @return Pattern with regex expression
204+
* @return a pattern that looks for phone numbers patterns above
220205
*/
221206
public Pattern findAllPatternsForPhoneNumbers() {
222207
throw new ExerciseNotCompletedException();
223208
}
224209

225210
/**
226-
* Create Pattern that accepts String with regex inside and can
227-
* find only duplicates
211+
* A Pattern that finds only duplicates
228212
*
229-
* @return Pattern with regex expression
213+
* @return a pattern that looks for duplicates
230214
*/
231215
public Pattern findOnlyDuplicates() {
232216
throw new ExerciseNotCompletedException();
@@ -265,4 +249,6 @@ public String replaceLastSevenDigitsOfPhoneNumberToX(String phones) {
265249
public String insertLinksAndResourcesIntoHref(String links) {
266250
throw new ExerciseNotCompletedException();
267251
}
252+
253+
268254
}

0 commit comments

Comments
 (0)