Commit Graph

75 Commits

Author SHA1 Message Date
Larry Chung 84ef2cd246 BAEL-2142 Code revision to WordIndexer and JUnit (#5484)
* Refactoring and Unit testing added based on Kevin Gilmore's advice of Sep 16, 2018

* Refactoring and Unit testing added based on Kevin Gilmore's advice of Sep 16, 2018

* Refactoring and Unit testing added based on Kevin Gilmore's advice of Sep 16, 2018

* Resolve merge conflict

Added dependency for org.passay and for org.apache.commons

* Create searching/WordIndexer.java

* Create WordIndexerUnitTest.java

* Updated in response to Kevin Gilmore's questions

"What happens if the string ends with the word you're searching for? Would the next iteration of the loop cause an error if index + wordLength is greater than the last position of the string? Be sure to test this scenario."

* Updated WordIndexer in response to Kevin Gilmore

Generally speaking, it's good practice to declare return types, parameters, variables using an interface rather than an implementation, if the interface is sufficient to satisfy the need. In this case, there's no reason you can't simply return a List of Integer. (Excellent point, fixed)

The two methods are identical. Isn't the first one supposed to be the naive approach? (It was a copy and paste error, fixed)

* saving changes...

* Update java-strings/src/main/java/com/baeldung/string/searching/WordIndexer.java

Co-Authored-By: codewarrior2000 <lpc34@columbia.edu>

* Update java-strings/src/main/java/com/baeldung/string/searching/WordIndexer.java

Co-Authored-By: codewarrior2000 <lpc34@columbia.edu>

* Update java-strings/src/test/java/com/baeldung/string/searching/WordIndexerUnitTest.java

Co-Authored-By: codewarrior2000 <lpc34@columbia.edu>

* Respond to Kevin Gilmore's code changes

* Debugging code change to JUnit
2018-10-26 21:06:48 -05:00
Loredana Crusoveanu 82e93b87a2
Merge pull request #5474 from Doha2012/master
convert string to byte array
2018-10-18 23:13:15 +03:00
Loredana Crusoveanu 6fd52ad66c
Update StringToByteArrayUnitTest.java 2018-10-18 22:59:29 +03:00
the-java-guy 8c3598b441 BAEL - 2166 (#5379)
* Bean Object, server side and client side example for event streaming
example

* BAEL-1628

Access a File from the Classpath in a Spring Application

* inputstream retrieval added

* Removed files related to evaluation article

* + Aligning code to the article. Removed Utility methods and classes

* Precommit fix

* PMD fixes

* Code Review changes
Refactored : whenResourceUtils_thenReadSuccessful

* BAEL-1934

* +indentation correction in pom.xml

* synced with master

* Precommit : rebase

* BAEL-1782

* BAEL - 2166 : Password Generation

* Removed unnecessary javaDoc

* Segregated utility method
2018-10-17 23:11:25 -05:00
DOHA 8ef39f81b4 string to byte array 2018-10-16 23:04:15 +03:00
Mher Baghinyan 2224e723fd Bael 2053 (#5331)
* String performance class

* String intern performance

* String performance replace

* String performance concat

* String performance split

* String performance convert

* String performance comparison

* String performance ==

* String performance check length

* String performance

* String performance matches

* String performance hints

* String performance %d

* fixing benchmark tests

* String performance final

* method naming convention fix

* renaming class name

* remove loops

* String performance review checked

* remove methods

* remove unnecessary class after the merge

* Delete pom.xml
2018-09-27 19:02:28 +02:00
Mher Baghinyan 5d7cc11745 Bael 2053 (#5161)
* String performance class

* String intern performance

* String performance replace

* String performance concat

* String performance split

* String performance convert

* String performance comparison

* String performance ==

* String performance check length

* String performance

* String performance matches

* String performance hints

* String performance %d

* fixing benchmark tests

* String performance final

* method naming convention fix

* renaming class name

* remove loops
2018-09-22 10:25:52 +02:00
Saikat 6a09ba47e8 Check String is not empty
Issue: BAEL-2128
2018-09-19 10:56:11 -06:00
Loredana Crusoveanu 9dbdfcf31f
Merge pull request #5233 from dkapil/task/BAEL-8901
BAEL-8901 Add section in "Stream operations on Strings" article
2018-09-13 09:13:34 +03:00
Dhawal Kapil 107e6a75be Feature/bael 2118 dhawal (#5231)
* [BAEL-2118] - Add a section in String Split Article

* [BAEL-2118] - Formatting and upgraded to JUNIT 5
2018-09-13 06:49:41 +02:00
Dhawal Kapil 708d64c183 BAEL-8901 Add section in "Stream operations on Strings" article
- Added string array to map example.
2018-09-12 12:13:51 +05:30
Loredana Crusoveanu 977c50ad85
Merge pull request #5154 from Doha2012/master
fix emoji test
2018-09-07 14:40:18 +03:00
Sai f9277b37fe Add examples for substring operations (#5139) 2018-09-06 14:27:53 +02:00
DOHA 5c8b1642b7 fix emoji test 2018-09-03 22:15:35 +03:00
Loredana Crusoveanu 3f35337028
Merge pull request #5135 from Doha2012/master
remove emojis
2018-09-02 14:35:35 +03:00
DOHA 409f252b0e remove emojis 2018-09-01 21:57:20 +03:00
cdjole 14b984f4d7 BAEL-2132 - Date to String conversion (#5116)
* BAEL-2132 - Date to String conversion

* BAEL-2132 - TimeZone set to CET
2018-09-01 08:32:55 -05:00
Denis 61de6251ec BAEL-2144 move code to different module 2018-08-30 21:58:38 +02:00
cdjole e77e8c0025 Bael 2139 update (#5037)
* code formatted

* Regex optimized.
2018-08-22 23:31:47 +02:00
cdjole cf6e74e631 Single regex example added (#5036) 2018-08-22 21:46:47 +02:00
cdjole 318c95f0c0 String containing characters (#5026) 2018-08-21 13:41:26 +02:00
amit2103 b4036907b9 [BAEL-8232] - Moved non-string related code to core-java and copied PizzaStatusEnum class and PizzaUnitTest relavent TCs to java-strings module 2018-08-19 01:20:13 +05:30
amit2103 742c77a931 [BAEL-8232] - Moved code from core-java to java-strings module for 'Converting Strings to Enums in Java' article 2018-08-19 00:34:16 +05:30
amit2103 ca9b13d705 [BAEL-8232] - Removed unwanted dependencies and moved CountCharsExampleUnitTest from core-java to java-strings module 2018-08-19 00:02:02 +05:30
amit2103 ab17b8e697 [BAEL-8232] - Moved java string related code and github links into new module java-strings 2018-08-18 23:24:10 +05:30