Merge branch 'master' into bael-16637
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -84,3 +84,4 @@ software-security/sql-injection-samples/derby.log
|
|||||||
spring-soap/src/main/java/com/baeldung/springsoap/gen/
|
spring-soap/src/main/java/com/baeldung/springsoap/gen/
|
||||||
/report-*.json
|
/report-*.json
|
||||||
transaction.log
|
transaction.log
|
||||||
|
*-shell.log
|
||||||
@@ -1,3 +1,3 @@
|
|||||||
### Relevant articles
|
### Relevant articles
|
||||||
|
|
||||||
- [Guide to Akka Streams](http://www.baeldung.com/akka-streams)
|
- [Guide to Akka Streams](https://www.baeldung.com/akka-streams)
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
## Relevant articles:
|
## Relevant articles:
|
||||||
|
|
||||||
- [Introduction to Jenetics Library](http://www.baeldung.com/jenetics)
|
- [Introduction to Jenetics Library](https://www.baeldung.com/jenetics)
|
||||||
- [Ant Colony Optimization](http://www.baeldung.com/java-ant-colony-optimization)
|
- [Ant Colony Optimization](https://www.baeldung.com/java-ant-colony-optimization)
|
||||||
- [Design a Genetic Algorithm in Java](https://www.baeldung.com/java-genetic-algorithm)
|
- [Design a Genetic Algorithm in Java](https://www.baeldung.com/java-genetic-algorithm)
|
||||||
- [The Traveling Salesman Problem in Java](https://www.baeldung.com/java-simulated-annealing-for-traveling-salesman)
|
- [The Traveling Salesman Problem in Java](https://www.baeldung.com/java-simulated-annealing-for-traveling-salesman)
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
## Relevant articles:
|
## Relevant articles:
|
||||||
|
|
||||||
- [Dijkstra Algorithm in Java](https://www.baeldung.com/java-dijkstra)
|
- [Dijkstra Shortest Path Algorithm in Java](https://www.baeldung.com/java-dijkstra)
|
||||||
- [Introduction to Cobertura](https://www.baeldung.com/cobertura)
|
- [Introduction to Cobertura](https://www.baeldung.com/cobertura)
|
||||||
- [Test a Linked List for Cyclicity](https://www.baeldung.com/java-linked-list-cyclicity)
|
- [Test a Linked List for Cyclicity](https://www.baeldung.com/java-linked-list-cyclicity)
|
||||||
- [Introduction to JGraphT](https://www.baeldung.com/jgrapht)
|
- [Introduction to JGraphT](https://www.baeldung.com/jgrapht)
|
||||||
|
|||||||
@@ -1,11 +1,17 @@
|
|||||||
|
## Algorithms - Miscellaneous
|
||||||
|
|
||||||
|
This module contains articles about algorithms. Some classes of algorithms, e.g., [sorting](/algorithms-sorting) and
|
||||||
|
[genetic algorithms](/algorithms-genetic), have their own dedicated modules.
|
||||||
|
|
||||||
## Relevant Articles:
|
## Relevant Articles:
|
||||||
|
|
||||||
- [Java Two Pointer Technique](https://www.baeldung.com/java-two-pointer-technique)
|
- [Java Two Pointer Technique](https://www.baeldung.com/java-two-pointer-technique)
|
||||||
- [Implementing Simple State Machines with Java Enums](https://www.baeldung.com/java-enum-simple-state-machine)
|
- [Implementing Simple State Machines with Java Enums](https://www.baeldung.com/java-enum-simple-state-machine)
|
||||||
- [Converting Between Roman and Arabic Numerals in Java](http://www.baeldung.com/java-convert-roman-arabic)
|
- [Converting Between Roman and Arabic Numerals in Java](https://www.baeldung.com/java-convert-roman-arabic)
|
||||||
- [Practical Java Examples of the Big O Notation](http://www.baeldung.com/java-algorithm-complexity)
|
- [Practical Java Examples of the Big O Notation](https://www.baeldung.com/java-algorithm-complexity)
|
||||||
- [Checking If a List Is Sorted in Java](https://www.baeldung.com/java-check-if-list-sorted)
|
- [Checking If a List Is Sorted in Java](https://www.baeldung.com/java-check-if-list-sorted)
|
||||||
- [Checking if a Java Graph has a Cycle](https://www.baeldung.com/java-graph-has-a-cycle)
|
- [Checking if a Java Graph has a Cycle](https://www.baeldung.com/java-graph-has-a-cycle)
|
||||||
- [A Guide to the Folding Technique in Java](https://www.baeldung.com/folding-hashing-technique)
|
- [A Guide to the Folding Technique in Java](https://www.baeldung.com/folding-hashing-technique)
|
||||||
- [Creating a Triangle with for Loops in Java](https://www.baeldung.com/java-print-triangle)
|
- [Creating a Triangle with for Loops in Java](https://www.baeldung.com/java-print-triangle)
|
||||||
- [Efficient Word Frequency Calculator in Java](https://www.baeldung.com/java-word-frequency)
|
- [Efficient Word Frequency Calculator in Java](https://www.baeldung.com/java-word-frequency)
|
||||||
|
- More articles: [[<-- prev]](/algorithms-miscellaneous-2) [[next -->]](/algorithms-miscellaneous-4)
|
||||||
@@ -1,9 +1,14 @@
|
|||||||
## Relevant articles:
|
## Algorithms - Sorting
|
||||||
|
|
||||||
- [Bubble Sort in Java](http://www.baeldung.com/java-bubble-sort)
|
This module contains articles about sorting algorithms.
|
||||||
|
|
||||||
|
### Relevant articles:
|
||||||
|
|
||||||
|
- [Bubble Sort in Java](https://www.baeldung.com/java-bubble-sort)
|
||||||
- [Merge Sort in Java](https://www.baeldung.com/java-merge-sort)
|
- [Merge Sort in Java](https://www.baeldung.com/java-merge-sort)
|
||||||
- [Quicksort Algorithm Implementation in Java](https://www.baeldung.com/java-quicksort)
|
- [Quicksort Algorithm Implementation in Java](https://www.baeldung.com/java-quicksort)
|
||||||
- [Insertion Sort in Java](https://www.baeldung.com/java-insertion-sort)
|
- [Insertion Sort in Java](https://www.baeldung.com/java-insertion-sort)
|
||||||
- [Heap Sort in Java](https://www.baeldung.com/java-heap-sort)
|
- [Heap Sort in Java](https://www.baeldung.com/java-heap-sort)
|
||||||
- [Shell Sort in Java](https://www.baeldung.com/java-shell-sort)
|
- [Shell Sort in Java](https://www.baeldung.com/java-shell-sort)
|
||||||
- [Counting Sort in Java](https://www.baeldung.com/java-counting-sort)
|
- [Counting Sort in Java](https://www.baeldung.com/java-counting-sort)
|
||||||
|
- [Sorting Strings by Contained Numbers in Java](https://www.baeldung.com/java-sort-strings-contained-numbers)
|
||||||
|
|||||||
@@ -1,3 +1,7 @@
|
|||||||
## Relevant articles:
|
## Animal Sniffer Maven Plugin
|
||||||
|
|
||||||
[Introduction to Animal Sniffer Maven Plugin](http://www.baeldung.com/maven-animal-sniffer)
|
This module contains articles about the Animal Sniffer Maven Plugin
|
||||||
|
|
||||||
|
### Relevant articles:
|
||||||
|
|
||||||
|
[Introduction to Animal Sniffer Maven Plugin](https://www.baeldung.com/maven-animal-sniffer)
|
||||||
|
|||||||
7
annotations/README.md
Normal file
7
annotations/README.md
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
## Annotations
|
||||||
|
|
||||||
|
This module contains articles about Java annotations
|
||||||
|
|
||||||
|
### Relevant Articles:
|
||||||
|
|
||||||
|
- [Java Annotation Processing and Creating a Builder](https://www.baeldung.com/java-annotation-processing-builder)
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
### Relevant Articles:
|
|
||||||
- [Java Annotation Processing and Creating a Builder](http://www.baeldung.com/java-annotation-processing-builder)
|
|
||||||
@@ -1,3 +1,7 @@
|
|||||||
|
## ANTLR
|
||||||
|
|
||||||
|
This module contains articles about ANTLR
|
||||||
|
|
||||||
### Relevant Articles:
|
### Relevant Articles:
|
||||||
|
|
||||||
- [Java with ANTLR](http://www.baeldung.com/java-antlr)
|
- [Java with ANTLR](https://www.baeldung.com/java-antlr)
|
||||||
|
|||||||
@@ -1,2 +1,6 @@
|
|||||||
|
## Apache Avro
|
||||||
|
|
||||||
|
This module contains articles about Apache Avro
|
||||||
|
|
||||||
### Relevant Articles:
|
### Relevant Articles:
|
||||||
- [Guide to Apache Avro](http://www.baeldung.com/java-apache-avro)
|
- [Guide to Apache Avro](https://www.baeldung.com/java-apache-avro)
|
||||||
|
|||||||
@@ -1,2 +1,7 @@
|
|||||||
|
## Apache BVal
|
||||||
|
|
||||||
|
This module contains articles about Apache BVal
|
||||||
|
|
||||||
### Relevant Articles:
|
### Relevant Articles:
|
||||||
- [Intro to Apache BVal](http://www.baeldung.com/apache-bval)
|
|
||||||
|
- [Intro to Apache BVal](https://www.baeldung.com/apache-bval)
|
||||||
|
|||||||
@@ -1,3 +1,7 @@
|
|||||||
|
## Apache Curator
|
||||||
|
|
||||||
|
This module contains articles about Apache Curator
|
||||||
|
|
||||||
### Relevant Articles:
|
### Relevant Articles:
|
||||||
|
|
||||||
- [Introduction to Apache Curator](http://www.baeldung.com/apache-curator)
|
- [Introduction to Apache Curator](https://www.baeldung.com/apache-curator)
|
||||||
|
|||||||
@@ -1,6 +1,10 @@
|
|||||||
|
## Apache CXF
|
||||||
|
|
||||||
|
This module contains articles about Apache CXF
|
||||||
|
|
||||||
## Relevant Articles:
|
## Relevant Articles:
|
||||||
- [Introduction to Apache CXF Aegis Data Binding](http://www.baeldung.com/aegis-data-binding-in-apache-cxf)
|
- [Introduction to Apache CXF Aegis Data Binding](https://www.baeldung.com/aegis-data-binding-in-apache-cxf)
|
||||||
- [Apache CXF Support for RESTful Web Services](http://www.baeldung.com/apache-cxf-rest-api)
|
- [Apache CXF Support for RESTful Web Services](https://www.baeldung.com/apache-cxf-rest-api)
|
||||||
- [A Guide to Apache CXF with Spring](http://www.baeldung.com/apache-cxf-with-spring)
|
- [A Guide to Apache CXF with Spring](https://www.baeldung.com/apache-cxf-with-spring)
|
||||||
- [Introduction to Apache CXF](http://www.baeldung.com/introduction-to-apache-cxf)
|
- [Introduction to Apache CXF](https://www.baeldung.com/introduction-to-apache-cxf)
|
||||||
- [Server-Sent Events (SSE) In JAX-RS](https://www.baeldung.com/java-ee-jax-rs-sse)
|
- [Server-Sent Events (SSE) In JAX-RS](https://www.baeldung.com/java-ee-jax-rs-sse)
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
=========
|
## Apache FOP
|
||||||
|
|
||||||
## Core Java Cookbooks and Examples
|
This module contains articles about Apache FOP
|
||||||
|
|
||||||
### Relevant Articles:
|
### Relevant Articles:
|
||||||
|
|||||||
@@ -1,3 +1,7 @@
|
|||||||
|
## Apache Geode
|
||||||
|
|
||||||
|
This module contains articles about Apache Geode
|
||||||
|
|
||||||
### Relevant Articles:
|
### Relevant Articles:
|
||||||
|
|
||||||
- [A Quick Guide to Apache Geode](https://www.baeldung.com/apache-geode)
|
- [A Quick Guide to Apache Geode](https://www.baeldung.com/apache-geode)
|
||||||
|
|||||||
@@ -1,3 +1,7 @@
|
|||||||
|
## Apache Meecrowave
|
||||||
|
|
||||||
|
This module contains articles about Apache Meecrowave
|
||||||
|
|
||||||
### Relevant Articles:
|
### Relevant Articles:
|
||||||
================================
|
|
||||||
- [Building a Microservice with Apache Meecrowave](http://www.baeldung.com/apache-meecrowave)
|
- [Building a Microservice with Apache Meecrowave](https://www.baeldung.com/apache-meecrowave)
|
||||||
@@ -1,3 +1,8 @@
|
|||||||
## Relevant articles:
|
## Apache Olingo
|
||||||
|
|
||||||
|
This module contains articles about Apache Olingo
|
||||||
|
|
||||||
|
### Relevant articles:
|
||||||
|
|
||||||
- [OData Protocol Guide](https://www.baeldung.com/odata)
|
- [OData Protocol Guide](https://www.baeldung.com/odata)
|
||||||
|
- [Intro to OData with Olingo](https://www.baeldung.com/olingo)
|
||||||
|
|||||||
@@ -1,3 +1,7 @@
|
|||||||
|
## Apache OpenNLP
|
||||||
|
|
||||||
|
This module contains articles about Apache OpenNLP
|
||||||
|
|
||||||
### Relevant Articles
|
### Relevant Articles
|
||||||
|
|
||||||
- [Intro to Apache OpenNLP](http://www.baeldung.com/apache-open-nlp)
|
- [Intro to Apache OpenNLP](https://www.baeldung.com/apache-open-nlp)
|
||||||
|
|||||||
@@ -1,4 +1,8 @@
|
|||||||
|
## Apache POI
|
||||||
|
|
||||||
|
This module contains articles about Apache POI
|
||||||
|
|
||||||
### Relevant Articles:
|
### Relevant Articles:
|
||||||
- [Microsoft Word Processing in Java with Apache POI](http://www.baeldung.com/java-microsoft-word-with-apache-poi)
|
- [Microsoft Word Processing in Java with Apache POI](https://www.baeldung.com/java-microsoft-word-with-apache-poi)
|
||||||
- [Working with Microsoft Excel in Java](http://www.baeldung.com/java-microsoft-excel)
|
- [Working with Microsoft Excel in Java](https://www.baeldung.com/java-microsoft-excel)
|
||||||
- [Creating a MS PowerPoint Presentation in Java](http://www.baeldung.com/apache-poi-slideshow)
|
- [Creating a MS PowerPoint Presentation in Java](https://www.baeldung.com/apache-poi-slideshow)
|
||||||
|
|||||||
@@ -1,3 +1,7 @@
|
|||||||
|
## Apache Pulsar
|
||||||
|
|
||||||
|
This module contains articles about Apache Pulsar
|
||||||
|
|
||||||
### Relevant Articles:
|
### Relevant Articles:
|
||||||
|
|
||||||
- [Introduction to Apache Pulsar](https://www.baeldung.com/apache-pulsar)
|
- [Introduction to Apache Pulsar](https://www.baeldung.com/apache-pulsar)
|
||||||
|
|||||||
@@ -1,2 +1,7 @@
|
|||||||
### Relevant articles
|
## Apache Shiro
|
||||||
- [Introduction to Apache Shiro](http://www.baeldung.com/apache-shiro)
|
|
||||||
|
This module contains articles about Apache Shiro
|
||||||
|
|
||||||
|
### Relevant articles:
|
||||||
|
|
||||||
|
- [Introduction to Apache Shiro](https://www.baeldung.com/apache-shiro)
|
||||||
@@ -1,4 +1,7 @@
|
|||||||
## Apache Solrj Tutorials Project
|
## Apache Solrj
|
||||||
|
|
||||||
### Relevant Articles
|
This module contains articles about Apache Solrj
|
||||||
- [Guide to Solr in Java with Apache Solrj](http://www.baeldung.com/apache-solrj)
|
|
||||||
|
### Relevant Articles:
|
||||||
|
|
||||||
|
- [Guide to Solr in Java with Apache Solrj](https://www.baeldung.com/apache-solrj)
|
||||||
@@ -1,4 +1,8 @@
|
|||||||
### Relevant articles
|
## Apache Spark
|
||||||
|
|
||||||
- [Introduction to Apache Spark](http://www.baeldung.com/apache-spark)
|
This module contains articles about Apache Spark
|
||||||
|
|
||||||
|
### Relevant articles:
|
||||||
|
|
||||||
|
- [Introduction to Apache Spark](https://www.baeldung.com/apache-spark)
|
||||||
- [Building a Data Pipeline with Kafka, Spark Streaming and Cassandra](https://www.baeldung.com/kafka-spark-data-pipeline)
|
- [Building a Data Pipeline with Kafka, Spark Streaming and Cassandra](https://www.baeldung.com/kafka-spark-data-pipeline)
|
||||||
|
|||||||
@@ -1,3 +1,7 @@
|
|||||||
## Relevant articles:
|
## Apache Thrift
|
||||||
|
|
||||||
- [Working with Apache Thrift](http://www.baeldung.com/apache-thrift)
|
This module contains articles about Apache Thrift
|
||||||
|
|
||||||
|
### Relevant articles:
|
||||||
|
|
||||||
|
- [Working with Apache Thrift](https://www.baeldung.com/apache-thrift)
|
||||||
|
|||||||
@@ -1,3 +1,7 @@
|
|||||||
## Relevant articles:
|
## Apache Tika
|
||||||
|
|
||||||
- [Content Analysis with Apache Tika](http://www.baeldung.com/apache-tika)
|
This module contains articles about Apache Tika
|
||||||
|
|
||||||
|
### Relevant articles:
|
||||||
|
|
||||||
|
- [Content Analysis with Apache Tika](https://www.baeldung.com/apache-tika)
|
||||||
|
|||||||
@@ -1,3 +1,7 @@
|
|||||||
## Relevant articles:
|
## Apache Velocity
|
||||||
|
|
||||||
- [Introduction to Apache Velocity](http://www.baeldung.com/apache-velocity)
|
This module contains articles about Apache Velocity
|
||||||
|
|
||||||
|
### Relevant articles:
|
||||||
|
|
||||||
|
- [Introduction to Apache Velocity](https://www.baeldung.com/apache-velocity)
|
||||||
|
|||||||
@@ -1,3 +1,7 @@
|
|||||||
## Relevant articles:
|
## Apache Zookeeper
|
||||||
|
|
||||||
- [Getting Started with Java and Zookeeper](http://www.baeldung.com/java-zookeeper)
|
This module contains articles about Apache Zookeeper
|
||||||
|
|
||||||
|
### Relevant articles:
|
||||||
|
|
||||||
|
- [Getting Started with Java and Zookeeper](https://www.baeldung.com/java-zookeeper)
|
||||||
|
|||||||
@@ -1,4 +1,8 @@
|
|||||||
### Relevant articles
|
## Asciidoctor
|
||||||
|
|
||||||
- [Generating a Book with Asciidoctor](http://www.baeldung.com/asciidoctor-book)
|
This module contains articles about Asciidoctor
|
||||||
- [Introduction to Asciidoctor in Java](http://www.baeldung.com/asciidoctor)
|
|
||||||
|
### Relevant articles:
|
||||||
|
|
||||||
|
- [Generating a Book with Asciidoctor](https://www.baeldung.com/asciidoctor-book)
|
||||||
|
- [Introduction to Asciidoctor in Java](https://www.baeldung.com/asciidoctor)
|
||||||
|
|||||||
@@ -1,3 +1,7 @@
|
|||||||
|
## ASM
|
||||||
|
|
||||||
|
This module contains articles about ASM
|
||||||
|
|
||||||
### Relevant Articles:
|
### Relevant Articles:
|
||||||
|
|
||||||
- [A Guide to Java Bytecode Manipulation with ASM](http://www.baeldung.com/java-asm)
|
- [A Guide to Java Bytecode Manipulation with ASM](https://www.baeldung.com/java-asm)
|
||||||
|
|||||||
@@ -1,3 +1,7 @@
|
|||||||
## Relevant articles:
|
## Atomix
|
||||||
|
|
||||||
- [Introduction to Atomix](http://www.baeldung.com/atomix)
|
This module contains articles about Atomix
|
||||||
|
|
||||||
|
### Relevant articles:
|
||||||
|
|
||||||
|
- [Introduction to Atomix](https://www.baeldung.com/atomix)
|
||||||
|
|||||||
@@ -1,4 +0,0 @@
|
|||||||
### Relevant Articles:
|
|
||||||
- [Introduction to AutoValue](http://www.baeldung.com/introduction-to-autovalue)
|
|
||||||
- [Introduction to AutoFactory](http://www.baeldung.com/autofactory)
|
|
||||||
- [Google AutoService](https://www.baeldung.com/google-autoservice)
|
|
||||||
@@ -1,3 +1,7 @@
|
|||||||
|
## AWS Lambda
|
||||||
|
|
||||||
|
This module contains articles about AWS Lambda
|
||||||
|
|
||||||
### Relevant Articles:
|
### Relevant Articles:
|
||||||
- [Using AWS Lambda with API Gateway](http://www.baeldung.com/aws-lambda-api-gateway)
|
- [Using AWS Lambda with API Gateway](https://www.baeldung.com/aws-lambda-api-gateway)
|
||||||
- [Introduction to AWS Serverless Application Model](http://www.baeldung.com/aws-serverless)
|
- [Introduction to AWS Serverless Application Model](https://www.baeldung.com/aws-serverless)
|
||||||
|
|||||||
@@ -1,11 +1,15 @@
|
|||||||
|
## AWS
|
||||||
|
|
||||||
|
This module contains articles about AWS
|
||||||
|
|
||||||
### Relevant articles
|
### Relevant articles
|
||||||
|
|
||||||
- [AWS Lambda Using DynamoDB With Java](http://www.baeldung.com/aws-lambda-dynamodb-java)
|
- [AWS Lambda Using DynamoDB With Java](https://www.baeldung.com/aws-lambda-dynamodb-java)
|
||||||
- [AWS S3 with Java](http://www.baeldung.com/aws-s3-java)
|
- [AWS S3 with Java](https://www.baeldung.com/aws-s3-java)
|
||||||
- [AWS Lambda With Java](http://www.baeldung.com/java-aws-lambda)
|
- [AWS Lambda With Java](https://www.baeldung.com/java-aws-lambda)
|
||||||
- [Managing EC2 Instances in Java](http://www.baeldung.com/ec2-java)
|
- [Managing EC2 Instances in Java](https://www.baeldung.com/ec2-java)
|
||||||
- [Multipart Uploads in Amazon S3 with Java](http://www.baeldung.com/aws-s3-multipart-upload)
|
- [Multipart Uploads in Amazon S3 with Java](https://www.baeldung.com/aws-s3-multipart-upload)
|
||||||
- [Integration Testing with a Local DynamoDB Instance](http://www.baeldung.com/dynamodb-local-integration-tests)
|
- [Integration Testing with a Local DynamoDB Instance](https://www.baeldung.com/dynamodb-local-integration-tests)
|
||||||
- [Using the JetS3t Java Client With Amazon S3](http://www.baeldung.com/jets3t-amazon-s3)
|
- [Using the JetS3t Java Client With Amazon S3](https://www.baeldung.com/jets3t-amazon-s3)
|
||||||
- [Managing Amazon SQS Queues in Java](http://www.baeldung.com/aws-queues-java)
|
- [Managing Amazon SQS Queues in Java](https://www.baeldung.com/aws-queues-java)
|
||||||
- [Guide to AWS Aurora RDS with Java](https://www.baeldung.com/aws-aurora-rds-java)
|
- [Guide to AWS Aurora RDS with Java](https://www.baeldung.com/aws-aurora-rds-java)
|
||||||
|
|||||||
@@ -1,3 +1,7 @@
|
|||||||
|
## Axon
|
||||||
|
|
||||||
|
This module contains articles about Axon
|
||||||
|
|
||||||
### Relevant articles
|
### Relevant articles
|
||||||
|
|
||||||
- [A Guide to the Axon Framework](http://www.baeldung.com/axon-cqrs-event-sourcing)
|
- [A Guide to the Axon Framework](https://www.baeldung.com/axon-cqrs-event-sourcing)
|
||||||
|
|||||||
@@ -1,4 +1,8 @@
|
|||||||
|
## Azure
|
||||||
|
|
||||||
|
This module contains articles about Azure
|
||||||
|
|
||||||
### Relevant Articles:
|
### Relevant Articles:
|
||||||
|
|
||||||
- [Deploy a Spring Boot App to Azure](http://www.baeldung.com/spring-boot-azure)
|
- [Deploy a Spring Boot App to Azure](https://www.baeldung.com/spring-boot-azure)
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,7 @@
|
|||||||
## Relevant Articles:
|
## Bazel
|
||||||
|
|
||||||
|
This module contains articles about Bazel
|
||||||
|
|
||||||
|
### Relevant Articles:
|
||||||
|
|
||||||
- [Building Java Applications with Bazel](https://www.baeldung.com/bazel-build-tool)
|
- [Building Java Applications with Bazel](https://www.baeldung.com/bazel-build-tool)
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
### Relevant Articles:
|
### Relevant Articles:
|
||||||
|
|
||||||
- [Blade – A Complete Guidebook](http://www.baeldung.com/blade)
|
- [Blade – A Complete Guidebook](https://www.baeldung.com/blade)
|
||||||
|
|
||||||
Run Integration Tests with `mvn integration-test`
|
Run Integration Tests with `mvn integration-test`
|
||||||
|
|||||||
@@ -1,2 +1,6 @@
|
|||||||
|
## Bootique
|
||||||
|
|
||||||
|
This module contains articles about Bootique
|
||||||
|
|
||||||
### Relevant Articles:
|
### Relevant Articles:
|
||||||
- [Introduction to Bootique](http://www.baeldung.com/bootique)
|
- [Introduction to Bootique](https://www.baeldung.com/bootique)
|
||||||
|
|||||||
7
cas/README.md
Normal file
7
cas/README.md
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
## CAS
|
||||||
|
|
||||||
|
This module contains articles about the Central Authentication Service (CAS)
|
||||||
|
|
||||||
|
### Relevant Articles:
|
||||||
|
|
||||||
|
- [CAS SSO With Spring Security](baeldung.com/spring-security-cas-sso)
|
||||||
@@ -1,5 +1,9 @@
|
|||||||
|
## CDI
|
||||||
|
|
||||||
|
This module contains articles about Contexts and Dependency Injection (CDI)
|
||||||
|
|
||||||
### Relevant Articles:
|
### Relevant Articles:
|
||||||
- [CDI Interceptor vs Spring AspectJ](http://www.baeldung.com/cdi-interceptor-vs-spring-aspectj)
|
- [CDI Interceptor vs Spring AspectJ](https://www.baeldung.com/cdi-interceptor-vs-spring-aspectj)
|
||||||
- [An Introduction to CDI (Contexts and Dependency Injection) in Java](http://www.baeldung.com/java-ee-cdi)
|
- [An Introduction to CDI (Contexts and Dependency Injection) in Java](https://www.baeldung.com/java-ee-cdi)
|
||||||
- [Introduction to the Event Notification Model in CDI 2.0](https://www.baeldung.com/cdi-event-notification)
|
- [Introduction to the Event Notification Model in CDI 2.0](https://www.baeldung.com/cdi-event-notification)
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
package com.baeldung.cdi.cdi2observers.application;
|
package com.baeldung.cdi2observers.application;
|
||||||
|
|
||||||
|
import com.baeldung.cdi2observers.events.ExampleEvent;
|
||||||
|
|
||||||
import com.baeldung.cdi.cdi2observers.events.ExampleEvent;
|
|
||||||
import javax.enterprise.inject.se.SeContainer;
|
import javax.enterprise.inject.se.SeContainer;
|
||||||
import javax.enterprise.inject.se.SeContainerInitializer;
|
import javax.enterprise.inject.se.SeContainerInitializer;
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
package com.baeldung.cdi.cdi2observers.events;
|
package com.baeldung.cdi2observers.events;
|
||||||
|
|
||||||
public class ExampleEvent {
|
public class ExampleEvent {
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
package com.baeldung.cdi.cdi2observers.events;
|
package com.baeldung.cdi2observers.events;
|
||||||
|
|
||||||
import javax.enterprise.event.Event;
|
import javax.enterprise.event.Event;
|
||||||
import javax.inject.Inject;
|
import javax.inject.Inject;
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
package com.baeldung.cdi.cdi2observers.observers;
|
package com.baeldung.cdi2observers.observers;
|
||||||
|
|
||||||
|
import com.baeldung.cdi2observers.events.ExampleEvent;
|
||||||
|
|
||||||
import com.baeldung.cdi.cdi2observers.events.ExampleEvent;
|
|
||||||
import javax.annotation.Priority;
|
import javax.annotation.Priority;
|
||||||
import javax.enterprise.event.Observes;
|
import javax.enterprise.event.Observes;
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
package com.baeldung.cdi.cdi2observers.observers;
|
package com.baeldung.cdi2observers.observers;
|
||||||
|
|
||||||
import com.baeldung.cdi.cdi2observers.events.ExampleEvent;
|
import com.baeldung.cdi2observers.events.ExampleEvent;
|
||||||
import com.baeldung.cdi.cdi2observers.services.TextService;
|
import com.baeldung.cdi2observers.services.TextService;
|
||||||
import javax.annotation.Priority;
|
import javax.annotation.Priority;
|
||||||
import javax.enterprise.event.Observes;
|
import javax.enterprise.event.Observes;
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
package com.baeldung.cdi.cdi2observers.services;
|
package com.baeldung.cdi2observers.services;
|
||||||
|
|
||||||
public class TextService {
|
public class TextService {
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,8 @@
|
|||||||
<beans xmlns="http://java.sun.com/xml/ns/javaee"
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<beans xmlns="http://xmlns.jcp.org/xml/ns/javaee"
|
||||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
|
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/beans_1_1.xsd"
|
||||||
http://java.sun.com/xml/ns/javaee/beans_1_2.xsd">
|
bean-discovery-mode="all">
|
||||||
<interceptors>
|
<interceptors>
|
||||||
<class>com.baeldung.interceptor.AuditedInterceptor</class>
|
<class>com.baeldung.interceptor.AuditedInterceptor</class>
|
||||||
</interceptors>
|
</interceptors>
|
||||||
|
|||||||
@@ -1,9 +1,10 @@
|
|||||||
package com.baeldung.cdi.cdi2observers.tests;
|
package com.baeldung.test.cdi2observers.tests;
|
||||||
|
|
||||||
import com.baeldung.cdi.cdi2observers.services.TextService;
|
import com.baeldung.cdi2observers.services.TextService;
|
||||||
import static org.assertj.core.api.Assertions.assertThat;
|
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
|
||||||
|
import static org.assertj.core.api.Assertions.assertThat;
|
||||||
|
|
||||||
public class TextServiceUnitTest {
|
public class TextServiceUnitTest {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
|||||||
@@ -6,7 +6,6 @@ import static org.assertj.core.api.Assertions.assertThat;
|
|||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
|
||||||
public class TimeLoggerFactoryUnitTest {
|
public class TimeLoggerFactoryUnitTest {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void givenTimeLoggerFactory_whenCalledgetTimeLogger_thenOneAssertion() {
|
public void givenTimeLoggerFactory_whenCalledgetTimeLogger_thenOneAssertion() {
|
||||||
TimeLoggerFactory timeLoggerFactory = new TimeLoggerFactory();
|
TimeLoggerFactory timeLoggerFactory = new TimeLoggerFactory();
|
||||||
|
|||||||
@@ -1,3 +1,7 @@
|
|||||||
|
## Checker Plugin
|
||||||
|
|
||||||
|
This module contains articles about the Checker Plugin
|
||||||
|
|
||||||
### Relevant articles
|
### Relevant articles
|
||||||
|
|
||||||
- [The Checker Framework – Pluggable Type Systems for Java](http://www.baeldung.com/checker-framework)
|
- [The Checker Framework – Pluggable Type Systems for Java](https://www.baeldung.com/checker-framework)
|
||||||
|
|||||||
@@ -1,3 +1,7 @@
|
|||||||
### Revelant Articles
|
## Cloud Foundry UAA
|
||||||
|
|
||||||
|
This module contains articles about Cloud Foundry UAA
|
||||||
|
|
||||||
|
### Relevant Articles:
|
||||||
|
|
||||||
- [A Quick Guide To Using Cloud Foundry UAA](https://www.baeldung.com/cloud-foundry-uaa)
|
- [A Quick Guide To Using Cloud Foundry UAA](https://www.baeldung.com/cloud-foundry-uaa)
|
||||||
|
|||||||
9
code-generation/README.md
Normal file
9
code-generation/README.md
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
## Code Generation
|
||||||
|
|
||||||
|
This module contains articles about automatic code generation
|
||||||
|
|
||||||
|
### Relevant Articles:
|
||||||
|
|
||||||
|
- [Introduction to AutoValue](https://www.baeldung.com/introduction-to-autovalue)
|
||||||
|
- [Introduction to AutoFactory](https://www.baeldung.com/autofactory)
|
||||||
|
- [Google AutoService](https://www.baeldung.com/google-autoservice)
|
||||||
@@ -2,9 +2,9 @@
|
|||||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<groupId>com.baeldung</groupId>
|
<groupId>com.baeldung</groupId>
|
||||||
<artifactId>autovalue</artifactId>
|
<artifactId>code-generation</artifactId>
|
||||||
<version>1.0</version>
|
<version>1.0</version>
|
||||||
<name>autovalue</name>
|
<name>code-generation</name>
|
||||||
|
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>com.baeldung</groupId>
|
<groupId>com.baeldung</groupId>
|
||||||
@@ -1,11 +1,14 @@
|
|||||||
# Groovy
|
# Core Groovy 2
|
||||||
|
|
||||||
|
This module contains articles about core Groovy concepts
|
||||||
|
|
||||||
## Relevant articles:
|
## Relevant articles:
|
||||||
|
|
||||||
- [String Matching in Groovy](http://www.baeldung.com/)
|
|
||||||
- [Template Engines in Groovy](https://www.baeldung.com/groovy-template-engines)
|
- [Template Engines in Groovy](https://www.baeldung.com/groovy-template-engines)
|
||||||
- [Groovy def Keyword](https://www.baeldung.com/groovy-def-keyword)
|
- [Groovy def Keyword](https://www.baeldung.com/groovy-def-keyword)
|
||||||
- [Pattern Matching in Strings in Groovy](https://www.baeldung.com/groovy-pattern-matching)
|
- [Pattern Matching in Strings in Groovy](https://www.baeldung.com/groovy-pattern-matching)
|
||||||
- [Working with XML in Groovy](https://www.baeldung.com/groovy-xml)
|
- [Working with XML in Groovy](https://www.baeldung.com/groovy-xml)
|
||||||
- [Integrating Groovy into Java Applications](https://www.baeldung.com/groovy-java-applications)
|
- [Integrating Groovy into Java Applications](https://www.baeldung.com/groovy-java-applications)
|
||||||
- [Concatenate Strings with Groovy](https://www.baeldung.com/groovy-concatenate-strings)
|
- [Concatenate Strings with Groovy](https://www.baeldung.com/groovy-concatenate-strings)
|
||||||
|
- [Metaprogramming in Groovy](https://www.baeldung.com/groovy-metaprogramming)
|
||||||
|
- [[<-- Prev]](/core-groovy)
|
||||||
@@ -1,4 +1,6 @@
|
|||||||
# Groovy
|
## Core Groovy Collections
|
||||||
|
|
||||||
|
This module contains articles about Groovy core collections
|
||||||
|
|
||||||
## Relevant articles:
|
## Relevant articles:
|
||||||
|
|
||||||
|
|||||||
@@ -1,9 +1,11 @@
|
|||||||
# Groovy
|
# Core Groovy
|
||||||
|
|
||||||
|
This module contains articles about core Groovy concepts
|
||||||
|
|
||||||
## Relevant articles:
|
## Relevant articles:
|
||||||
|
|
||||||
- [JDBC with Groovy](http://www.baeldung.com/jdbc-groovy)
|
- [JDBC with Groovy](https://www.baeldung.com/jdbc-groovy)
|
||||||
- [Working with JSON in Groovy](http://www.baeldung.com/groovy-json)
|
- [Working with JSON in Groovy](https://www.baeldung.com/groovy-json)
|
||||||
- [Reading a File in Groovy](https://www.baeldung.com/groovy-file-read)
|
- [Reading a File in Groovy](https://www.baeldung.com/groovy-file-read)
|
||||||
- [Types of Strings in Groovy](https://www.baeldung.com/groovy-strings)
|
- [Types of Strings in Groovy](https://www.baeldung.com/groovy-strings)
|
||||||
- [A Quick Guide to Iterating a Map in Groovy](https://www.baeldung.com/groovy-map-iterating)
|
- [A Quick Guide to Iterating a Map in Groovy](https://www.baeldung.com/groovy-map-iterating)
|
||||||
@@ -13,3 +15,4 @@
|
|||||||
- [Lists in Groovy](https://www.baeldung.com/groovy-lists)
|
- [Lists in Groovy](https://www.baeldung.com/groovy-lists)
|
||||||
- [Converting a String to a Date in Groovy](https://www.baeldung.com/groovy-string-to-date)
|
- [Converting a String to a Date in Groovy](https://www.baeldung.com/groovy-string-to-date)
|
||||||
- [Guide to I/O in Groovy](https://www.baeldung.com/groovy-io)
|
- [Guide to I/O in Groovy](https://www.baeldung.com/groovy-io)
|
||||||
|
- [[More -->]](/core-groovy-2)
|
||||||
@@ -1,3 +1,7 @@
|
|||||||
|
## Core Java Modules
|
||||||
|
|
||||||
|
This module contains modules about core Java
|
||||||
|
|
||||||
## Relevant articles:
|
## Relevant articles:
|
||||||
|
|
||||||
- [Multi-Module Maven Application with Java Modules](https://www.baeldung.com/maven-multi-module-project-java-jpms)
|
- [Multi-Module Maven Application with Java Modules](https://www.baeldung.com/maven-multi-module-project-java-jpms)
|
||||||
|
|||||||
@@ -1,3 +1,6 @@
|
|||||||
|
## Core Java 10
|
||||||
|
|
||||||
|
This module contains articles about Java 10 core features
|
||||||
|
|
||||||
### Relevant Articles:
|
### Relevant Articles:
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,7 @@
|
|||||||
|
## Core Java 11
|
||||||
|
|
||||||
|
This module contains articles about Java 11 core features
|
||||||
|
|
||||||
### Relevant articles
|
### Relevant articles
|
||||||
|
|
||||||
- [Java 11 Single File Source Code](https://www.baeldung.com/java-single-file-source-code)
|
- [Java 11 Single File Source Code](https://www.baeldung.com/java-single-file-source-code)
|
||||||
|
|||||||
@@ -1,10 +1,11 @@
|
|||||||
=========
|
## Core Java 8 (part 2)
|
||||||
|
|
||||||
## Core Java 8 Cookbooks and Examples (part 2)
|
This module contains articles about Java 8 core features
|
||||||
|
|
||||||
### Relevant Articles:
|
### Relevant Articles:
|
||||||
- [Anonymous Classes in Java](http://www.baeldung.com/)
|
- [Anonymous Classes in Java](http://www.baeldung.com/)
|
||||||
- [How to Delay Code Execution in Java](https://www.baeldung.com/java-delay-code-execution)
|
- [How to Delay Code Execution in Java](https://www.baeldung.com/java-delay-code-execution)
|
||||||
- [Run JAR Application With Command Line Arguments](https://www.baeldung.com/java-run-jar-with-arguments)
|
- [Run a Java Application from the Command Line](https://www.baeldung.com/java-run-jar-with-arguments)
|
||||||
- [Java 8 Stream skip() vs limit()](https://www.baeldung.com/java-stream-skip-vs-limit)
|
- [Java 8 Stream skip() vs limit()](https://www.baeldung.com/java-stream-skip-vs-limit)
|
||||||
- [Guide to Java BiFunction Interface](https://www.baeldung.com/java-bifunction-interface)
|
- [Guide to Java BiFunction Interface](https://www.baeldung.com/java-bifunction-interface)
|
||||||
|
- [[<-- Prev]](/core-java-modules/core-java-8)
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
=========
|
## Core Java 8
|
||||||
|
|
||||||
## Core Java 8 Cookbooks and Examples
|
This module contains articles about Java 8 core features
|
||||||
|
|
||||||
### Relevant Articles:
|
### Relevant Articles:
|
||||||
- [New Features in Java 8](https://www.baeldung.com/java-8-new-features)
|
- [New Features in Java 8](https://www.baeldung.com/java-8-new-features)
|
||||||
@@ -12,3 +12,4 @@
|
|||||||
- [Finding Min/Max in an Array with Java](https://www.baeldung.com/java-array-min-max)
|
- [Finding Min/Max in an Array with Java](https://www.baeldung.com/java-array-min-max)
|
||||||
- [Internationalization and Localization in Java 8](https://www.baeldung.com/java-8-localization)
|
- [Internationalization and Localization in Java 8](https://www.baeldung.com/java-8-localization)
|
||||||
- [Generalized Target-Type Inference in Java](https://www.baeldung.com/java-generalized-target-type-inference)
|
- [Generalized Target-Type Inference in Java](https://www.baeldung.com/java-generalized-target-type-inference)
|
||||||
|
- [[More -->]](/core-java-modules/core-java-8-2)
|
||||||
|
|||||||
@@ -1,8 +1,6 @@
|
|||||||
=========
|
## Core Java 9
|
||||||
|
|
||||||
## Core Java 9 Examples
|
This module contains articles about Java 9 core features
|
||||||
|
|
||||||
[Java 9 New Features](http://www.baeldung.com/new-java-9)
|
|
||||||
|
|
||||||
### Relevant Articles:
|
### Relevant Articles:
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,7 @@
|
|||||||
|
## Core Java Arrays (Part 2)
|
||||||
|
|
||||||
|
This module contains articles about Java arrays
|
||||||
|
|
||||||
## Relevant Articles
|
## Relevant Articles
|
||||||
|
|
||||||
- [Extending an Array’s Length](https://www.baeldung.com/java-array-add-element-at-the-end)
|
- [Extending an Array’s Length](https://www.baeldung.com/java-array-add-element-at-the-end)
|
||||||
@@ -8,3 +12,4 @@
|
|||||||
- [Intersection Between two Integer Arrays](https://www.baeldung.com/java-array-intersection)
|
- [Intersection Between two Integer Arrays](https://www.baeldung.com/java-array-intersection)
|
||||||
- [Removing an Element from an Array in Java](https://www.baeldung.com/java-array-remove-element)
|
- [Removing an Element from an Array in Java](https://www.baeldung.com/java-array-remove-element)
|
||||||
- [Removing the First Element of an Array](https://www.baeldung.com/java-array-remove-first-element)
|
- [Removing the First Element of an Array](https://www.baeldung.com/java-array-remove-first-element)
|
||||||
|
- [[<-- Prev]](/core-java-modules/core-java-arrays)
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
=========
|
## Core Java Arrays
|
||||||
|
|
||||||
## Core Java Arrays Cookbooks and Examples
|
This module contains articles about Java arrays
|
||||||
|
|
||||||
### Relevant Articles:
|
### Relevant Articles:
|
||||||
- [How to Copy an Array in Java](https://www.baeldung.com/java-array-copy)
|
- [How to Copy an Array in Java](https://www.baeldung.com/java-array-copy)
|
||||||
@@ -10,6 +10,8 @@
|
|||||||
- [Multi-Dimensional Arrays In Java](https://www.baeldung.com/java-jagged-arrays)
|
- [Multi-Dimensional Arrays In Java](https://www.baeldung.com/java-jagged-arrays)
|
||||||
- [Find Sum and Average in a Java Array](https://www.baeldung.com/java-array-sum-average)
|
- [Find Sum and Average in a Java Array](https://www.baeldung.com/java-array-sum-average)
|
||||||
- [Arrays in Java: A Reference Guide](https://www.baeldung.com/java-arrays-guide)
|
- [Arrays in Java: A Reference Guide](https://www.baeldung.com/java-arrays-guide)
|
||||||
- [How to Invert an Array in Java](https://www.baeldung.com/java-invert-array)
|
- [Read and Write User Input in Java](https://www.baeldung.com/java-console-input-output)
|
||||||
|
- [How to Reverse an Array in Java](http://www.baeldung.com/java-invert-array)
|
||||||
- [Sorting Arrays in Java](https://www.baeldung.com/java-sorting-arrays)
|
- [Sorting Arrays in Java](https://www.baeldung.com/java-sorting-arrays)
|
||||||
- [Checking If an Array Is Sorted in Java](https://www.baeldung.com/java-check-sorted-array)
|
- [Checking If an Array Is Sorted in Java](https://www.baeldung.com/java-check-sorted-array)
|
||||||
|
- [[More -->]](/core-java-modules/core-java-arrays-2)
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
=========
|
## Core Java Collections ArrayList
|
||||||
|
|
||||||
## Core Java Collections Array List Cookbooks and Examples
|
This module contains articles about the Java ArrayList collection
|
||||||
|
|
||||||
### Relevant Articles:
|
### Relevant Articles:
|
||||||
- [Immutable ArrayList in Java](http://www.baeldung.com/java-immutable-list)
|
- [Immutable ArrayList in Java](http://www.baeldung.com/java-immutable-list)
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
=========
|
## Core Java Collections List (Part 2)
|
||||||
|
|
||||||
## Core Java Collections List Cookbooks and Examples
|
This module contains articles about the Java List collection
|
||||||
|
|
||||||
### Relevant Articles:
|
### Relevant Articles:
|
||||||
- [Check If Two Lists are Equal in Java](http://www.baeldung.com/java-test-a-list-for-ordinality-and-equality)
|
- [Check If Two Lists are Equal in Java](http://www.baeldung.com/java-test-a-list-for-ordinality-and-equality)
|
||||||
@@ -11,3 +11,4 @@
|
|||||||
- [Ways to Iterate Over a List in Java](https://www.baeldung.com/java-iterate-list)
|
- [Ways to Iterate Over a List in Java](https://www.baeldung.com/java-iterate-list)
|
||||||
- [Flattening Nested Collections in Java](http://www.baeldung.com/java-flatten-nested-collections)
|
- [Flattening Nested Collections in Java](http://www.baeldung.com/java-flatten-nested-collections)
|
||||||
- [Intersection of Two Lists in Java](https://www.baeldung.com/java-lists-intersection)
|
- [Intersection of Two Lists in Java](https://www.baeldung.com/java-lists-intersection)
|
||||||
|
- [[<-- Prev]](/core-java-modules/core-java-collections-list)[[Next -->]](/core-java-modules/core-java-collections-list-3)
|
||||||
@@ -0,0 +1,72 @@
|
|||||||
|
package com.baeldung.findastring;
|
||||||
|
|
||||||
|
import com.google.common.base.Predicates;
|
||||||
|
import com.google.common.collect.Iterables;
|
||||||
|
import com.google.common.collect.Lists;
|
||||||
|
import org.apache.commons.collections4.IterableUtils;
|
||||||
|
import org.apache.commons.collections4.IteratorUtils;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.regex.Pattern;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
public class FindAStringInGivenList {
|
||||||
|
|
||||||
|
|
||||||
|
public List<String> findUsingLoopWithRegex(String search, List<String> list) {
|
||||||
|
|
||||||
|
List<String> matches = new ArrayList<String>();
|
||||||
|
|
||||||
|
String pattern = ".*"+search+".*";
|
||||||
|
Pattern p = Pattern.compile(pattern);
|
||||||
|
|
||||||
|
for(String str: list) {
|
||||||
|
if (p.matcher(str).matches()) {
|
||||||
|
matches.add(str);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return matches;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public List<String> findUsingLoop(String search, List<String> list) {
|
||||||
|
|
||||||
|
List<String> matches = new ArrayList<String>();
|
||||||
|
|
||||||
|
for(String str: list) {
|
||||||
|
if (str.contains(search)) {
|
||||||
|
matches.add(str);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return matches;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<String> findUsingStream(String search, List<String> list) {
|
||||||
|
|
||||||
|
List<String> matchingElements =
|
||||||
|
list.stream()
|
||||||
|
.filter(str -> str.trim().contains(search))
|
||||||
|
.collect(Collectors.toList());
|
||||||
|
|
||||||
|
return matchingElements;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<String> findUsingGuava(String search, List<String> list) {
|
||||||
|
Iterable<String> result = Iterables.filter(list, Predicates.containsPattern(search));
|
||||||
|
|
||||||
|
return Lists.newArrayList(result.iterator());
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<String> findUsingCommonsCollection(String search, List<String> list) {
|
||||||
|
Iterable<String> result = IterableUtils.filteredIterable(list, new org.apache.commons.collections4.Predicate<String>() {
|
||||||
|
public boolean evaluate(String listElement) {
|
||||||
|
return listElement.contains(search);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
return IteratorUtils.toList(result.iterator());
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,62 @@
|
|||||||
|
package com.baeldung.findastring;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||||
|
import org.junit.Test;
|
||||||
|
public class FindAStringInListUnitTest {
|
||||||
|
|
||||||
|
private static List<String> list = new ArrayList<>();
|
||||||
|
|
||||||
|
static {
|
||||||
|
list.add("Jack and Jill");
|
||||||
|
list.add("James and Sarah");
|
||||||
|
list.add("Sam and Louise");
|
||||||
|
list.add("Jack");
|
||||||
|
list.add("");
|
||||||
|
}
|
||||||
|
|
||||||
|
private static FindAStringInGivenList findAStringInGivenList = new FindAStringInGivenList();
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void givenAString_whenFoundUsingLoopWithRegex_thenReturnList() {
|
||||||
|
List matchingElements = findAStringInGivenList.findUsingLoopWithRegex("Jack", list);
|
||||||
|
assertEquals(2, matchingElements.size());
|
||||||
|
assertEquals("Jack and Jill", matchingElements.get(0));
|
||||||
|
assertEquals("Jack", matchingElements.get(1));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void givenAString_whenFoundUsingLoop_thenReturnList() {
|
||||||
|
List matchingElements = findAStringInGivenList.findUsingLoop("Jack", list);
|
||||||
|
assertEquals(2, matchingElements.size());
|
||||||
|
assertEquals("Jack and Jill", matchingElements.get(0));
|
||||||
|
assertEquals("Jack", matchingElements.get(1));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void givenAString_whenFoundUsingStream_thenReturnList(){
|
||||||
|
List matchingElements = findAStringInGivenList.findUsingStream("Jack", list);
|
||||||
|
assertEquals(2, matchingElements.size());
|
||||||
|
assertEquals("Jack and Jill", matchingElements.get(0));
|
||||||
|
assertEquals("Jack", matchingElements.get(1));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void givenAString_whenFoundUsingCommonsCollection_thenReturnList(){
|
||||||
|
List matchingElements = findAStringInGivenList.findUsingCommonsCollection("Jack", list);
|
||||||
|
assertEquals(2, matchingElements.size());
|
||||||
|
assertEquals("Jack and Jill", matchingElements.get(0));
|
||||||
|
assertEquals("Jack", matchingElements.get(1));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void givenAString_whenFoundUsingGuava_thenReturnList(){
|
||||||
|
List matchingElements = findAStringInGivenList.findUsingGuava("Jack", list);
|
||||||
|
assertEquals(2, matchingElements.size());
|
||||||
|
assertEquals("Jack and Jill", matchingElements.get(0));
|
||||||
|
assertEquals("Jack", matchingElements.get(1));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
=========
|
## Core Java Collections List (Part 3)
|
||||||
|
|
||||||
## Core Java Collections List Cookbooks and Examples
|
This module contains articles about the Java List collection
|
||||||
|
|
||||||
### Relevant Articles:
|
### Relevant Articles:
|
||||||
- [Collections.emptyList() vs. New List Instance](https://www.baeldung.com/java-collections-emptylist-new-list)
|
- [Collections.emptyList() vs. New List Instance](https://www.baeldung.com/java-collections-emptylist-new-list)
|
||||||
@@ -9,3 +9,4 @@
|
|||||||
- [List of Primitive Integer Values in Java](https://www.baeldung.com/java-list-primitive-int)
|
- [List of Primitive Integer Values in Java](https://www.baeldung.com/java-list-primitive-int)
|
||||||
- [Performance Comparison of Primitive Lists in Java](https://www.baeldung.com/java-list-primitive-performance)
|
- [Performance Comparison of Primitive Lists in Java](https://www.baeldung.com/java-list-primitive-performance)
|
||||||
- [Filtering a Java Collection by a List](https://www.baeldung.com/java-filter-collection-by-list)
|
- [Filtering a Java Collection by a List](https://www.baeldung.com/java-filter-collection-by-list)
|
||||||
|
- [[<-- Prev]](/core-java-modules/core-java-collections-list-2)
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
=========
|
## Core Java Collections List
|
||||||
|
|
||||||
## Core Java Collections List Cookbooks and Examples
|
This module contains articles about the Java List collection
|
||||||
|
|
||||||
### Relevant Articles:
|
### Relevant Articles:
|
||||||
- [Java – Get Random Item/Element From a List](http://www.baeldung.com/java-random-list-element)
|
- [Java – Get Random Item/Element From a List](http://www.baeldung.com/java-random-list-element)
|
||||||
@@ -12,3 +12,4 @@
|
|||||||
- [How to Find an Element in a List with Java](http://www.baeldung.com/find-list-element-java)
|
- [How to Find an Element in a List with Java](http://www.baeldung.com/find-list-element-java)
|
||||||
- [Finding Max/Min of a List or Collection](http://www.baeldung.com/java-collection-min-max)
|
- [Finding Max/Min of a List or Collection](http://www.baeldung.com/java-collection-min-max)
|
||||||
- [Remove All Occurrences of a Specific Value from a List](https://www.baeldung.com/java-remove-value-from-list)
|
- [Remove All Occurrences of a Specific Value from a List](https://www.baeldung.com/java-remove-value-from-list)
|
||||||
|
- [[Next -->]](/core-java-modules/core-java-collections-list-2)
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
=========
|
## Core Java Collections Set
|
||||||
|
|
||||||
## Core Java Sets Cookbooks and Examples
|
This module contains articles about the Java Set collection
|
||||||
|
|
||||||
### Relevant Articles:
|
### Relevant Articles:
|
||||||
- [Set Operations in Java](http://www.baeldung.com/set-operations-in-java)
|
- [Set Operations in Java](http://www.baeldung.com/set-operations-in-java)
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
=========
|
## Core Java Collections
|
||||||
|
|
||||||
## Core Java Collections Cookbooks and Examples
|
This module contains articles about Java collections
|
||||||
|
|
||||||
### Relevant Articles:
|
### Relevant Articles:
|
||||||
- [Collect a Java Stream to an Immutable Collection](https://www.baeldung.com/java-stream-immutable-collection)
|
- [Collect a Java Stream to an Immutable Collection](https://www.baeldung.com/java-stream-immutable-collection)
|
||||||
@@ -13,3 +13,4 @@
|
|||||||
- [Defining a Char Stack in Java](https://www.baeldung.com/java-char-stack)
|
- [Defining a Char Stack in Java](https://www.baeldung.com/java-char-stack)
|
||||||
- [Guide to the Java Queue Interface](https://www.baeldung.com/java-queue)
|
- [Guide to the Java Queue Interface](https://www.baeldung.com/java-queue)
|
||||||
- [An Introduction to Synchronized Java Collections](https://www.baeldung.com/java-synchronized-collections)
|
- [An Introduction to Synchronized Java Collections](https://www.baeldung.com/java-synchronized-collections)
|
||||||
|
- [[More -->]](/core-java-modules/core-java-collections-2)
|
||||||
@@ -1,5 +1,3 @@
|
|||||||
=========
|
|
||||||
|
|
||||||
## Core Java Concurrency Advanced Examples
|
## Core Java Concurrency Advanced Examples
|
||||||
|
|
||||||
This module contains articles about advanced topics about multithreading with core Java.
|
This module contains articles about advanced topics about multithreading with core Java.
|
||||||
@@ -15,5 +13,4 @@ This module contains articles about advanced topics about multithreading with co
|
|||||||
- [An Introduction to Atomic Variables in Java](https://www.baeldung.com/java-atomic-variables)
|
- [An Introduction to Atomic Variables in Java](https://www.baeldung.com/java-atomic-variables)
|
||||||
- [CyclicBarrier in Java](https://www.baeldung.com/java-cyclic-barrier)
|
- [CyclicBarrier in Java](https://www.baeldung.com/java-cyclic-barrier)
|
||||||
- [Guide to the Volatile Keyword in Java](https://www.baeldung.com/java-volatile)
|
- [Guide to the Volatile Keyword in Java](https://www.baeldung.com/java-volatile)
|
||||||
|
- More Articles: [[next -->]](/core-java-modules/core-java-concurrency-advanced-2)
|
||||||
[[next -->]](/core-java-modules/core-java-concurrency-advanced-2)
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
=========
|
## Core Java Concurrency Basic
|
||||||
|
|
||||||
## Core Java Concurrency Basic Examples
|
This module contains articles about basic Java concurrency
|
||||||
|
|
||||||
### Relevant Articles:
|
### Relevant Articles:
|
||||||
- [Guide To CompletableFuture](https://www.baeldung.com/java-completablefuture)
|
- [Guide To CompletableFuture](https://www.baeldung.com/java-completablefuture)
|
||||||
@@ -13,3 +13,4 @@
|
|||||||
- [Runnable vs. Callable in Java](https://www.baeldung.com/java-runnable-callable)
|
- [Runnable vs. Callable in Java](https://www.baeldung.com/java-runnable-callable)
|
||||||
- [What is Thread-Safety and How to Achieve it?](https://www.baeldung.com/java-thread-safety)
|
- [What is Thread-Safety and How to Achieve it?](https://www.baeldung.com/java-thread-safety)
|
||||||
- [How to Start a Thread in Java](https://www.baeldung.com/java-start-thread)
|
- [How to Start a Thread in Java](https://www.baeldung.com/java-start-thread)
|
||||||
|
- [[Next -->]](/core-java-modules/core-java-concurrency-basic-2)
|
||||||
|
|||||||
@@ -12,10 +12,12 @@ public class SemaPhoreDemo {
|
|||||||
System.out.println("Number of threads waiting to acquire: " + semaphore.getQueueLength());
|
System.out.println("Number of threads waiting to acquire: " + semaphore.getQueueLength());
|
||||||
|
|
||||||
if (semaphore.tryAcquire()) {
|
if (semaphore.tryAcquire()) {
|
||||||
semaphore.acquire();
|
try {
|
||||||
// perform some critical operations
|
// perform some critical operations
|
||||||
|
} finally {
|
||||||
semaphore.release();
|
semaphore.release();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
=========
|
## Core Java Concurrency Collections
|
||||||
|
|
||||||
## Core Java Concurrency Collections Examples
|
This module contains articles about concurrent Java collections
|
||||||
|
|
||||||
### Relevant Articles:
|
### Relevant Articles:
|
||||||
- [Guide to java.util.concurrent.BlockingQueue](http://www.baeldung.com/java-blocking-queue)
|
- [Guide to java.util.concurrent.BlockingQueue](http://www.baeldung.com/java-blocking-queue)
|
||||||
|
|||||||
@@ -1,8 +1,13 @@
|
|||||||
## Relevant Articles:
|
## Core Java Exceptions
|
||||||
|
|
||||||
- [Will an Error Be Caught by Catch Block in Java?](https://www.baeldung.com/java-error-catch)
|
This module contains articles about core java exceptions
|
||||||
- [Java Global Exception Handler](http://www.baeldung.com/java-global-exception-handler)
|
|
||||||
- [Common Java Exceptions](http://www.baeldung.com/java-common-exceptions)
|
### Relevant articles:
|
||||||
- [Throw Exception in Optional in Java 8](https://www.baeldung.com/java-optional-throw-exception)
|
- [Chained Exceptions in Java](https://www.baeldung.com/java-chained-exceptions)
|
||||||
- [How to Find an Exception’s Root Cause in Java](https://www.baeldung.com/java-exception-root-cause)
|
- [ClassNotFoundException vs NoClassDefFoundError](https://www.baeldung.com/java-classnotfoundexception-and-noclassdeffounderror)
|
||||||
- [Java – Try with Resources](https://www.baeldung.com/java-try-with-resources)
|
- [Create a Custom Exception in Java](https://www.baeldung.com/java-new-custom-exception)
|
||||||
|
- [Exception Handling in Java](https://www.baeldung.com/java-exceptions)
|
||||||
|
- [Differences Between Final, Finally and Finalize in Java](https://www.baeldung.com/java-final-finally-finalize)
|
||||||
|
- [Difference Between Throw and Throws in Java](https://www.baeldung.com/java-throw-throws)
|
||||||
|
- [“Sneaky Throws” in Java](https://www.baeldung.com/java-sneaky-throws)
|
||||||
|
- [The StackOverflowError in Java](https://www.baeldung.com/java-stack-overflow-error)
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user