Commit Graph

41 Commits

Author SHA1 Message Date
Eric Martin 72574f554a
Merge pull request #6112 from MherBaghinyan/BAEL-2328
Bael 2328
2019-01-28 20:22:43 -06:00
mherbaghinyan 2a308c51cb suggested refactor 2019-01-27 10:34:13 +04:00
mherbaghinyan 5c1a0a0629 change the ArrayList into List 2019-01-21 09:57:15 +04:00
mherbaghinyan 9f798d483d test the methods with Unit test 2019-01-16 13:18:04 +04:00
mherbaghinyan aa125c6c6b remove unnecessary method 2019-01-14 11:58:31 +04:00
mherbaghinyan c9275edf90 matching for all keywords 2019-01-14 11:53:53 +04:00
mherbaghinyan 04c6cd1215 replace hardcoded strings 2019-01-13 11:35:54 +04:00
mherbaghinyan 06ffe3b5e4 match words final refactor 2019-01-13 11:04:42 +04:00
mherbaghinyan 16bed6f64b match words refactoring 2019-01-13 10:42:18 +04:00
mherbaghinyan ea5039f1a1 indexOf changed example 2019-01-11 15:05:34 +04:00
mherbaghinyan 9e9458ea5f indexOf example 2019-01-09 17:17:35 +04:00
mherbaghinyan d413ec768f match words final 2019-01-09 16:18:32 +04:00
mherbaghinyan 1861e9b94c match words 2019-01-09 16:16:48 +04:00
mherbaghinyan f1e3ceaea7 text searching Aho-Corasick algorithm 2019-01-09 12:21:43 +04:00
Eric Martin 3da571a218
Merge pull request #6052 from jainvarz/BAEL-2536-check-for-a-panagram-string
BAEL-2536-check-for-a-panagram-string
2019-01-07 19:59:02 -06:00
Rajesh Bhojwani 65b9909fed username:rajeshbhojwani "Java toString() method" (#6047)
* Check in code for Java toString method

* fix formatting issues

* Fix formatting issues

* Fix formatting issues

* Fix formatting issues

* Fix formatting issues

* Fix formatting issues

* replacing orders with order

* Update formatting

* Fix formatting

* Fix formatting

* Fix formatting

* Fix formatting

* Fix formatting
2019-01-07 10:31:13 +02:00
Varun Jain 082724abec BAEL-2536-addressed review comments 2019-01-05 10:38:13 +05:30
Varun Jain 693da95f44 BAEL-2536-updated Panagram to Pangram 2019-01-03 22:44:52 +05:30
Varun Jain 4eb3f29430 BAEL-2536-addressed review comments 2019-01-03 22:42:26 +05:30
Varun Jain 75bf7ba515 BAEL-2536-check-for-a-panagram-string 2019-01-02 22:11:21 +05:30
amit2103 eb4928b972 [BAEL-11403] - Moved articles out of core-java (part 4) 2018-12-30 16:30:36 +05:30
Shashank agarwal fda7ff2690 Added Character Array method (#5965)
* Added the code of Replace char in a string at specific index

* added test cases

* Renamed the Test class name end with UnitTest

* Renamed the Test class name end with UnitTest

* Renamed the Test class name end with UnitTest

* Replaced README with the upstream repo

* Added Char Array Method
2018-12-23 09:27:01 -06:00
Shashank agarwal 547f99925f Added the code of Replace char in a string at specific index (#5869)
* Added the code of Replace char in a string at specific index

* added test cases

* Renamed the Test class name end with UnitTest

* Renamed the Test class name end with UnitTest

* Renamed the Test class name end with UnitTest

* Replaced README with the upstream repo
2018-12-19 22:49:27 -06:00
PranayVJain b6e0928f5b BAEL-2337: Moved code from java-strings to algorithm-miscellaneous-1 (#5905) 2018-12-14 22:31:26 -06:00
PranayVJain 5072291b32 BAEL-2337: Find Substring which are palindromes (#5766)
* BAEL-2337: Added test cases to find substring which are palindromes

* BAEL-2337: Changed the names of the variables

* BAEL-2237: Formatted code using formatter.xml

* BAEL-2237: Renamed method and added variety of test cases

* BAEL-2337: Renamed unit test cases name according to BBD style naming convention
2018-12-07 21:16:28 -06:00
fanatixan 857192358c bael-2361 (#5804)
* bael-2361

* Update RemoveLeadingAndTrailingZeroes.java

* moving examples to java-string project
2018-12-02 10:36:38 -08:00
amit2103 bff2c6f5b0 [BAEL-10780] - Added code for the checking string input article 2018-11-25 01:25:41 +05:30
kyleandari 58a536c395 BAEL 2330
* Implementing Hexagonal Architecture in java

* Removing duplicates from a string

* Fix for the code review feedback
- removing the hexagonal architecture code
- removing the methods removeDuplicatesUsingCharArray
- adding some meaningful sentences to test

* Fix for the code review feedback
- fix for removeDuplicatesUsingCharArray
- adding unit testing
- adding brackets around for loops

* Fix for the code review feedback

* Adding remove duplicates using java 8 distinct
adding assets to the unittests to test for empty strings

* Checking for empty strings in unit tests
Adding an if statement to check whether an empty string is passed to removeDuplicatesUsingSorting method
2018-11-23 07:46:20 -08:00
kyleandari eba76ca5a2 BAEL-2330 (#5694)
* Implementing Hexagonal Architecture in java

* Removing duplicates from a string

* Fix for the code review feedback
- removing the hexagonal architecture code
- removing the methods removeDuplicatesUsingCharArray
- adding some meaningful sentences to test

* Fix for the code review feedback
- fix for removeDuplicatesUsingCharArray
- adding unit testing
- adding brackets around for loops

* Fix for the code review feedback
2018-11-18 19:56:37 -08:00
eric-martin 3defeb3e96 Moved AddingNewLineToString from core-java to java-strings 2018-11-17 11:20:06 -06:00
cdjole c0a5e01918 Pad string. (#5669) 2018-11-11 19:44:35 -08:00
Varun Upadhyay 085825e149
Fixed a bug in findWord method 2018-11-01 18:18:10 -07:00
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
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
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
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
Denis 61de6251ec BAEL-2144 move code to different module 2018-08-30 21:58:38 +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 ab17b8e697 [BAEL-8232] - Moved java string related code and github links into new module java-strings 2018-08-18 23:24:10 +05:30