59 Commits

Author SHA1 Message Date
Eric Martin
0fa8d64898
Merge pull request #6118 from rodolforfq/BAEL-2446
BAEL-2446
2019-01-11 13:29:04 -06:00
Emily Cheyne
c65180c74f
BAEL-2535
Remove CustomerReflectionToStringUnitTest
2019-01-10 15:05:00 -07:00
Rodolfo Felipe
44a796b9e6 Deleting invalid package
Package added by eclipse. Nonexistent.
2019-01-09 23:16:44 -04:00
Rodolfo Felipe
57228dfc6b BAEL-2446
Unit tests for new added examples.
2019-01-09 22:29:44 -04:00
eric-martin
59fa72d45b Fix PMD violations in java-strings *ToStringTest 2019-01-07 21:51:47 -06: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
ramansahasi
bdcc961542 BAEL-2392_Java_String_interview_questions second commit (#6064) 2019-01-03 07:49:51 -07:00
Varun Jain
eacc84a450 BAEL-2536-added-unit-tests-for-panagram 2019-01-03 08:08:25 +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
Sam Millington
b4eee1e231 BAEL-2419: Added String Concatenation Unit Tests (#5898) 2018-12-24 10:02:29 -03:00
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
Loredana Crusoveanu
46c8f48d3c
Merge branch 'master' into BAEL-2313-String-to-byte-array 2018-12-16 12:39:51 +02:00
PranayVJain
b6e0928f5b BAEL-2337: Moved code from java-strings to algorithm-miscellaneous-1 (#5905) 2018-12-14 22:31:26 -06:00
Surapaneni Venkata Kiran
cb7e515723 BAEL-2421
* Changes for http://jira.baeldung.com/browse/BAEL-2421

* fixed formatting

* Merged the test and main classes as per the suggestion.

* Merged the source code with tests.
2018-12-12 11:19:45 -08: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
FrancoCorleone
a1de031c67 Add joining primitives tests (#5740)
* Add joining primitives tests

* Small refactor

* Fix naming for PMD

* Add char examples to testing cases

* Fix literal separator

* CR changes
2018-11-25 21:14:20 -06: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
Seun Matt
4d3b4ca3f0 Moved example code for BAEL-2366 (#5752)
* added example code for BAEL-2366

* moved example code for BAEL-2366
2018-11-21 23:02:44 -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
Eric Martin
06bb9653b9
Merge pull request #5661 from cror/substring-indexof
BAEL-2365: added 2 further examples with substring and indexOf
2018-11-12 21:17:29 -06:00
chandra
243323c55f Modified sample inputs to make the tests more meaningful. 2018-11-12 21:36:21 -05:00
cdjole
c0a5e01918 Pad string. (#5669) 2018-11-11 19:44:35 -08:00
cror
129aa9ddc9 BAEL-2365: added 2 further examples with substring and indexOf 2018-11-11 16:18:36 +01:00
chandra
be17633174 BAEL-2313 Convert String to Byte Array and Reverse in Java 2018-11-09 21:08:02 -05: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
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