Skip to content

Commit ab17b8e

Browse files
committed
[BAEL-8232] - Moved java string related code and github links into new module java-strings
1 parent 3a66380 commit ab17b8e

51 files changed

Lines changed: 284 additions & 80 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎core-java-8/README.md‎

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
- [Guide to Java 8 groupingBy Collector](http://www.baeldung.com/java-groupingby-collector)
1515
- [Strategy Design Pattern in Java 8](http://www.baeldung.com/java-strategy-pattern)
1616
- [Java 8 and Infinite Streams](http://www.baeldung.com/java-inifinite-streams)
17-
- [String Operations with Java Streams](http://www.baeldung.com/java-stream-operations-on-strings)
1817
- [Exceptions in Java 8 Lambda Expressions](http://www.baeldung.com/java-lambda-exceptions)
1918
- [Java 8 Stream findFirst() vs. findAny()](http://www.baeldung.com/java-stream-findfirst-vs-findany)
2019
- [Guide to Java 8 Comparator.comparing()](http://www.baeldung.com/java-8-comparator-comparing)
@@ -34,13 +33,11 @@
3433
- [Copy a File with Java](http://www.baeldung.com/java-copy-file)
3534
- [Static and Default Methods in Interfaces in Java](http://www.baeldung.com/java-static-default-methods)
3635
- [Iterable to Stream in Java](http://www.baeldung.com/java-iterable-to-stream)
37-
- [Converting String to Stream of chars](http://www.baeldung.com/java-string-to-stream)
3836
- [How to Iterate Over a Stream With Indices](http://www.baeldung.com/java-stream-indices)
3937
- [Efficient Word Frequency Calculator in Java](http://www.baeldung.com/java-word-frequency)
4038
- [Primitive Type Streams in Java 8](http://www.baeldung.com/java-8-primitive-streams)
4139
- [Fail-Safe Iterator vs Fail-Fast Iterator](http://www.baeldung.com/java-fail-safe-vs-fail-fast-iterator)
4240
- [Shuffling Collections In Java](http://www.baeldung.com/java-shuffle-collection)
43-
- [Java 8 StringJoiner](http://www.baeldung.com/java-string-joiner)
4441
- [Introduction to Spliterator in Java](http://www.baeldung.com/java-spliterator)
4542
- [Java 8 Math New Methods](http://www.baeldung.com/java-8-math)
4643
- [Overview of Java Built-in Annotations](http://www.baeldung.com/java-default-annotations)
@@ -54,7 +51,6 @@
5451
- [Java 8 Unsigned Arithmetic Support](http://www.baeldung.com/java-unsigned-arithmetic)
5552
- [How to Get the Start and the End of a Day using Java](http://www.baeldung.com/java-day-start-end)
5653
- [Generalized Target-Type Inference in Java](http://www.baeldung.com/java-generalized-target-type-inference)
57-
- [Image to Base64 String Conversion](http://www.baeldung.com/java-base64-image-string)
5854
- [Calculate Age in Java](http://www.baeldung.com/java-get-age)
5955
- [Copy a List to Another List in Java](http://www.baeldung.com/java-copy-list-to-another)
6056
- [Increment Date in Java](http://www.baeldung.com/java-increment-date)

‎core-java-9/README.md‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
- [Java 9 Reactive Streams](http://www.baeldung.com/java-9-reactive-streams)
1818
- [How to Get All Dates Between Two Dates?](http://www.baeldung.com/java-between-dates)
1919
- [Java 9 java.util.Objects Additions](http://www.baeldung.com/java-9-objects-new)
20-
- [Compact Strings in Java 9](http://www.baeldung.com/java-9-compact-string)
2120
- [Convert Date to LocalDate or LocalDateTime and Back](http://www.baeldung.com/java-date-to-localdate-and-localdatetime)
2221
- [Java 9 Variable Handles Demistyfied](http://www.baeldung.com/java-variable-handles)
2322
- [Exploring the New HTTP Client in Java 9](http://www.baeldung.com/java-9-http-client)

‎core-java/README.md‎

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,14 @@
33
## Core Java Cookbooks and Examples
44

55
### Relevant Articles:
6-
- [Java – Generate Random String](http://www.baeldung.com/java-random-string)
76
- [Java Timer](http://www.baeldung.com/java-timer-and-timertask)
87
- [How to Run a Shell Command in Java](http://www.baeldung.com/run-shell-command-in-java)
98
- [MD5 Hashing in Java](http://www.baeldung.com/java-md5)
109
- [Guide to Java Reflection](http://www.baeldung.com/java-reflection)
1110
- [A Guide to Java Sockets](http://www.baeldung.com/a-guide-to-java-sockets)
12-
- [Convert char to String in Java](http://www.baeldung.com/java-convert-char-to-string)
13-
- [Convert String to int or Integer in Java](http://www.baeldung.com/java-convert-string-to-int-or-integer)
1411
- [Java – Try with Resources](http://www.baeldung.com/java-try-with-resources)
1512
- [Guide to the Fork/Join Framework in Java](http://www.baeldung.com/java-fork-join)
1613
- [How to Print Screen in Java](http://www.baeldung.com/print-screen-in-java)
17-
- [How to Convert String to different data types in Java](http://www.baeldung.com/java-string-conversions)
1814
- [Introduction to Java Generics](http://www.baeldung.com/java-generics)
1915
- [Generate equals() and hashCode() with Eclipse](http://www.baeldung.com/java-eclipse-equals-and-hashcode)
2016
- [A Guide To Java Regular Expressions API](http://www.baeldung.com/regular-expressions-java)
@@ -37,8 +33,6 @@
3733
- [A Quick JUnit vs TestNG Comparison](http://www.baeldung.com/junit-vs-testng)
3834
- [Java Primitive Conversions](http://www.baeldung.com/java-primitive-conversions)
3935
- [Java Money and the Currency API](http://www.baeldung.com/java-money-and-currency)
40-
- [Converting Strings to Enums in Java](http://www.baeldung.com/java-string-to-enum)
41-
- [Quick Guide to the Java StringTokenizer](http://www.baeldung.com/java-stringtokenizer)
4236
- [JVM Log Forging](http://www.baeldung.com/jvm-log-forging)
4337
- [Guide to sun.misc.Unsafe](http://www.baeldung.com/java-unsafe)
4438
- [How to Perform a Simple HTTP Request in Java](http://www.baeldung.com/java-http-request)
@@ -55,28 +49,22 @@
5549
- [How to Copy an Array in Java](http://www.baeldung.com/java-array-copy)
5650
- [Period and Duration in Java](http://www.baeldung.com/java-period-duration)
5751
- [Converting a Stack Trace to a String in Java](http://www.baeldung.com/java-stacktrace-to-string)
58-
- [Count Occurrences of a Char in a String](http://www.baeldung.com/java-count-chars)
5952
- [Java Double Brace Initialization](http://www.baeldung.com/java-double-brace-initialization)
6053
- [The StackOverflowError in Java](http://www.baeldung.com/java-stack-overflow-error)
61-
- [Split a String in Java](http://www.baeldung.com/java-split-string)
6254
- [Introduction to Java Serialization](http://www.baeldung.com/java-serialization)
63-
- [How to Remove the Last Character of a String?](http://www.baeldung.com/java-remove-last-character-of-string)
6455
- [ClassNotFoundException vs NoClassDefFoundError](http://www.baeldung.com/java-classnotfoundexception-and-noclassdeffounderror)
6556
- [Guide to UUID in Java](http://www.baeldung.com/java-uuid)
6657
- [Guide to Escaping Characters in Java RegExps](http://www.baeldung.com/java-regexp-escape-char)
6758
- [Guide to hashCode() in Java](http://www.baeldung.com/java-hashcode)
6859
- [Difference between URL and URI](http://www.baeldung.com/java-url-vs-uri)
6960
- [Broadcasting and Multicasting in Java](http://www.baeldung.com/java-broadcast-multicast)
70-
- [CharSequence vs. String in Java](http://www.baeldung.com/java-char-sequence-string)
7161
- [Period and Duration in Java](http://www.baeldung.com/java-period-duration)
7262
- [Guide to the Diamond Operator in Java](http://www.baeldung.com/java-diamond-operator)
7363
- [“Sneaky Throws” in Java](http://www.baeldung.com/java-sneaky-throws)
7464
- [OutOfMemoryError: GC Overhead Limit Exceeded](http://www.baeldung.com/java-gc-overhead-limit-exceeded)
75-
- [StringBuilder and StringBuffer in Java](http://www.baeldung.com/java-string-builder-string-buffer)
7665
- [Creating a Java Compiler Plugin](http://www.baeldung.com/java-build-compiler-plugin)
7766
- [A Guide to the Static Keyword in Java](http://www.baeldung.com/java-static)
7867
- [Initializing Arrays in Java](http://www.baeldung.com/java-initialize-array)
79-
- [Guide to Java String Pool](http://www.baeldung.com/java-string-pool)
8068
- [Quick Example - Comparator vs Comparable in Java](http://www.baeldung.com/java-comparator-comparable)
8169
- [Quick Guide to Java Stack](http://www.baeldung.com/java-stack)
8270
- [The Java continue and break Keywords](http://www.baeldung.com/java-continue-and-break)
@@ -102,8 +90,6 @@
10290
- [The Trie Data Structure in Java](http://www.baeldung.com/trie-java)
10391
- [Introduction to Javadoc](http://www.baeldung.com/javadoc)
10492
- [How to Make a Deep Copy of an Object in Java](http://www.baeldung.com/java-deep-copy)
105-
- [Check if a String is a Palindrome](http://www.baeldung.com/java-palindrome)
106-
- [Comparing Strings in Java](http://www.baeldung.com/java-compare-strings)
10793
- [Guide to Inheritance in Java](http://www.baeldung.com/java-inheritance)
10894
- [Guide to Externalizable Interface in Java](http://www.baeldung.com/java-externalizable)
10995
- [Object Type Casting in Java](http://www.baeldung.com/java-type-casting)
@@ -135,11 +121,9 @@
135121
- [Infinite Loops in Java](http://www.baeldung.com/infinite-loops-java)
136122
- [Using Java Assertions](http://www.baeldung.com/java-assert)
137123
- [Pass-By-Value as a Parameter Passing Mechanism in Java](http://www.baeldung.com/java-pass-by-value-or-pass-by-reference)
138-
- [Check If a String Is Numeric in Java](http://www.baeldung.com/java-check-string-number)
139124
- [Variable and Method Hiding in Java](http://www.baeldung.com/java-variable-method-hiding)
140125
- [Access Modifiers in Java](http://www.baeldung.com/java-access-modifiers)
141126
- [Infinite Loops in Java](http://www.baeldung.com/infinite-loops-java)
142-
- [Why Use char[] Array Over a String for Storing Passwords in Java?](http://www.baeldung.com/java-storing-passwords)
143127
- [Introduction to Creational Design Patterns](http://www.baeldung.com/creational-design-patterns)
144128
- [Proxy, Decorator, Adapter and Bridge Patterns](http://www.baeldung.com/java-structural-design-patterns)
145129
- [Singletons in Java](http://www.baeldung.com/java-singleton)
@@ -153,7 +137,6 @@
153137
- [Importance of Main Manifest Attribute in a Self-Executing JAR](http://www.baeldung.com/java-jar-executable-manifest-main-class)
154138
- [Extracting Year, Month and Day from Date in Java](http://www.baeldung.com/java-year-month-day)
155139
- [Get Date Without Time in Java](http://www.baeldung.com/java-date-without-time)
156-
- [Convert a String to Title Case](http://www.baeldung.com/java-string-title-case)
157140
- [How to Get the File Extension of a File in Java](http://www.baeldung.com/java-file-extension)
158141
- [Immutable Objects in Java](http://www.baeldung.com/java-immutable-object)
159142
- [Console I/O in Java](http://www.baeldung.com/java-console-input-output)

‎core-java/pom.xml‎

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -137,11 +137,6 @@
137137
<artifactId>mail</artifactId>
138138
<version>${javax.mail.version}</version>
139139
</dependency>
140-
<dependency>
141-
<groupId>com.ibm.icu</groupId>
142-
<artifactId>icu4j</artifactId>
143-
<version>${icu4j.version}</version>
144-
</dependency>
145140
<!-- Mime Type Resolution Libraries -->
146141
<dependency>
147142
<groupId>org.apache.tika</groupId>

‎java-strings/README.md‎

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
=========
2+
3+
## Java Strings Cookbooks and Examples
4+
5+
### Relevant Articles:
6+
- [String Operations with Java Streams](http://www.baeldung.com/java-stream-operations-on-strings)
7+
- [Converting String to Stream of chars](http://www.baeldung.com/java-string-to-stream)
8+
- [Java 8 StringJoiner](http://www.baeldung.com/java-string-joiner)
9+
- [Image to Base64 String Conversion](http://www.baeldung.com/java-base64-image-string)
10+
- [Java – Generate Random String](http://www.baeldung.com/java-random-string)
11+
- [Convert char to String in Java](http://www.baeldung.com/java-convert-char-to-string)
12+
- [Convert String to int or Integer in Java](http://www.baeldung.com/java-convert-string-to-int-or-integer)
13+
- [How to Convert String to different data types in Java](http://www.baeldung.com/java-string-conversions)
14+
- [Converting Strings to Enums in Java](http://www.baeldung.com/java-string-to-enum)
15+
- [Quick Guide to the Java StringTokenizer](http://www.baeldung.com/java-stringtokenizer)
16+
- [Count Occurrences of a Char in a String](http://www.baeldung.com/java-count-chars)
17+
- [Split a String in Java](http://www.baeldung.com/java-split-string)
18+
- [How to Remove the Last Character of a String?](http://www.baeldung.com/java-remove-last-character-of-string)
19+
- [CharSequence vs. String in Java](http://www.baeldung.com/java-char-sequence-string)
20+
- [StringBuilder and StringBuffer in Java](http://www.baeldung.com/java-string-builder-string-buffer)
21+
- [Guide to Java String Pool](http://www.baeldung.com/java-string-pool)
22+
- [Check if a String is a Palindrome](http://www.baeldung.com/java-palindrome)
23+
- [Comparing Strings in Java](http://www.baeldung.com/java-compare-strings)
24+
- [Check If a String Is Numeric in Java](http://www.baeldung.com/java-check-string-number)
25+
- [Why Use char[] Array Over a String for Storing Passwords in Java?](http://www.baeldung.com/java-storing-passwords)
26+
- [Convert a String to Title Case](http://www.baeldung.com/java-string-title-case)
27+
- [Compact Strings in Java 9](http://www.baeldung.com/java-9-compact-string)

‎java-strings/pom.xml‎

Lines changed: 174 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,174 @@
1+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
2+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
3+
<modelVersion>4.0.0</modelVersion>
4+
<groupId>com.baeldung</groupId>
5+
<artifactId>java-strings</artifactId>
6+
<version>0.1.0-SNAPSHOT</version>
7+
<packaging>jar</packaging>
8+
<name>java-strings</name>
9+
10+
<parent>
11+
<groupId>com.baeldung</groupId>
12+
<artifactId>parent-java</artifactId>
13+
<version>0.0.1-SNAPSHOT</version>
14+
<relativePath>../parent-java</relativePath>
15+
</parent>
16+
17+
<dependencies>
18+
<dependency>
19+
<groupId>org.apache.commons</groupId>
20+
<artifactId>commons-collections4</artifactId>
21+
<version>${commons-collections4.version}</version>
22+
</dependency>
23+
<dependency>
24+
<groupId>commons-io</groupId>
25+
<artifactId>commons-io</artifactId>
26+
<version>${commons-io.version}</version>
27+
</dependency>
28+
<dependency>
29+
<groupId>org.apache.commons</groupId>
30+
<artifactId>commons-lang3</artifactId>
31+
<version>${commons-lang3.version}</version>
32+
</dependency>
33+
<dependency>
34+
<groupId>log4j</groupId>
35+
<artifactId>log4j</artifactId>
36+
<version>${log4j.version}</version>
37+
</dependency>
38+
<dependency>
39+
<groupId>commons-codec</groupId>
40+
<artifactId>commons-codec</artifactId>
41+
<version>${commons-codec.version}</version>
42+
</dependency>
43+
<dependency>
44+
<groupId>org.projectlombok</groupId>
45+
<artifactId>lombok</artifactId>
46+
<version>${lombok.version}</version>
47+
<scope>provided</scope>
48+
</dependency>
49+
<!-- test scoped -->
50+
<dependency>
51+
<groupId>org.assertj</groupId>
52+
<artifactId>assertj-core</artifactId>
53+
<version>${assertj.version}</version>
54+
<scope>test</scope>
55+
</dependency>
56+
<dependency>
57+
<groupId>com.jayway.awaitility</groupId>
58+
<artifactId>awaitility</artifactId>
59+
<version>${avaitility.version}</version>
60+
<scope>test</scope>
61+
</dependency>
62+
<dependency>
63+
<groupId>org.openjdk.jmh</groupId>
64+
<artifactId>jmh-core</artifactId>
65+
<version>${jmh-core.version}</version>
66+
</dependency>
67+
<dependency>
68+
<groupId>org.openjdk.jmh</groupId>
69+
<artifactId>jmh-generator-annprocess</artifactId>
70+
<version>${jmh-generator.version}</version>
71+
</dependency>
72+
<dependency>
73+
<groupId>org.openjdk.jmh</groupId>
74+
<artifactId>jmh-generator-bytecode</artifactId>
75+
<version>${jmh-generator.version}</version>
76+
</dependency>
77+
<dependency>
78+
<groupId>com.codepoetics</groupId>
79+
<artifactId>protonpack</artifactId>
80+
<version>${protonpack.version}</version>
81+
</dependency>
82+
<dependency>
83+
<groupId>io.vavr</groupId>
84+
<artifactId>vavr</artifactId>
85+
<version>${vavr.version}</version>
86+
</dependency>
87+
<dependency>
88+
<groupId>one.util</groupId>
89+
<artifactId>streamex</artifactId>
90+
<version>${streamex.version}</version>
91+
</dependency>
92+
<dependency>
93+
<groupId>joda-time</groupId>
94+
<artifactId>joda-time</artifactId>
95+
<version>${joda.version}</version>
96+
</dependency>
97+
<dependency>
98+
<groupId>org.aspectj</groupId>
99+
<artifactId>aspectjrt</artifactId>
100+
<version>${asspectj.version}</version>
101+
</dependency>
102+
<dependency>
103+
<groupId>org.aspectj</groupId>
104+
<artifactId>aspectjweaver</artifactId>
105+
<version>${asspectj.version}</version>
106+
</dependency>
107+
<dependency>
108+
<groupId>com.ibm.icu</groupId>
109+
<artifactId>icu4j</artifactId>
110+
<version>${icu4j.version}</version>
111+
</dependency>
112+
</dependencies>
113+
114+
<build>
115+
<finalName>java-strings</finalName>
116+
<resources>
117+
<resource>
118+
<directory>src/main/resources</directory>
119+
<filtering>true</filtering>
120+
</resource>
121+
</resources>
122+
123+
<plugins>
124+
<plugin>
125+
<groupId>org.apache.maven.plugins</groupId>
126+
<artifactId>maven-dependency-plugin</artifactId>
127+
<executions>
128+
<execution>
129+
<id>copy-dependencies</id>
130+
<phase>prepare-package</phase>
131+
<goals>
132+
<goal>copy-dependencies</goal>
133+
</goals>
134+
<configuration>
135+
<outputDirectory>${project.build.directory}/libs</outputDirectory>
136+
</configuration>
137+
</execution>
138+
</executions>
139+
</plugin>
140+
141+
<plugin>
142+
<groupId>org.apache.maven.plugins</groupId>
143+
<artifactId>maven-compiler-plugin</artifactId>
144+
<version>3.1</version>
145+
<configuration>
146+
<source>1.8</source>
147+
<target>1.8</target>
148+
<compilerArgument>-parameters</compilerArgument>
149+
</configuration>
150+
</plugin>
151+
</plugins>
152+
</build>
153+
154+
<properties>
155+
<!-- util -->
156+
<commons-lang3.version>3.5</commons-lang3.version>
157+
<commons-collections4.version>4.1</commons-collections4.version>
158+
<collections-generic.version>4.01</collections-generic.version>
159+
<commons-codec.version>1.10</commons-codec.version>
160+
<lombok.version>1.16.12</lombok.version>
161+
<vavr.version>0.9.0</vavr.version>
162+
<protonpack.version>1.13</protonpack.version>
163+
<streamex.version>0.6.5</streamex.version>
164+
<joda.version>2.10</joda.version>
165+
<!-- testing -->
166+
<assertj.version>3.6.1</assertj.version>
167+
<asspectj.version>1.8.9</asspectj.version>
168+
<avaitility.version>1.7.0</avaitility.version>
169+
<jmh-core.version>1.19</jmh-core.version>
170+
<jmh-generator.version>1.19</jmh-generator.version>
171+
<icu4j.version>61.1</icu4j.version>
172+
</properties>
173+
174+
</project>

core-java/src/main/java/com/baeldung/datetime/UseLocalDateTime.java renamed to java-strings/src/main/java/com/baeldung/datetime/UseLocalDateTime.java

File renamed without changes.

core-java-9/src/main/java/com/baeldung/java9/compactstring/CompactStringDemo.java renamed to java-strings/src/main/java/com/baeldung/java9/compactstring/CompactStringDemo.java

File renamed without changes.

core-java-8/src/main/java/com/baeldung/string/JoinerSplitter.java renamed to java-strings/src/main/java/com/baeldung/string/JoinerSplitter.java

File renamed without changes.

core-java/src/main/java/com/baeldung/string/Palindrome.java renamed to java-strings/src/main/java/com/baeldung/string/Palindrome.java

File renamed without changes.

0 commit comments

Comments
 (0)