Merge remote-tracking branch 'upstream/master'
This commit is contained in:
commit
db09069de8
|
@ -0,0 +1,15 @@
|
|||
=========
|
||||
|
||||
## Core Java Collections Cookbooks and Examples
|
||||
|
||||
### Relevant Articles:
|
||||
- [Removing Elements from Java Collections](https://www.baeldung.com/java-collection-remove-elements)
|
||||
- [How to Filter a Collection in Java](https://www.baeldung.com/java-collection-filtering)
|
||||
- [Join and Split Arrays and Collections in Java](https://www.baeldung.com/java-join-and-split)
|
||||
- [Java – Combine Multiple Collections](https://www.baeldung.com/java-combine-multiple-collections)
|
||||
- [Combining Different Types of Collections in Java](https://www.baeldung.com/java-combine-collections)
|
||||
- [Shuffling Collections In Java](https://www.baeldung.com/java-shuffle-collection)
|
||||
- [Sorting in Java](https://www.baeldung.com/java-sorting)
|
||||
- [Getting the Size of an Iterable in Java](https://www.baeldung.com/java-iterable-size)
|
||||
- [Java Null-Safe Streams from Collections](https://www.baeldung.com/java-null-safe-streams-from-collections)
|
||||
|
|
@ -0,0 +1,58 @@
|
|||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>core-java-collections-2</artifactId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
<name>core-java-collections-2</name>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<parent>
|
||||
<groupId>com.baeldung</groupId>
|
||||
<artifactId>parent-java</artifactId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
<relativePath>../../parent-java</relativePath>
|
||||
</parent>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.collections</groupId>
|
||||
<artifactId>eclipse-collections</artifactId>
|
||||
<version>${eclipse.collections.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.commons</groupId>
|
||||
<artifactId>commons-collections4</artifactId>
|
||||
<version>${commons-collections4.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.commons</groupId>
|
||||
<artifactId>commons-exec</artifactId>
|
||||
<version>${commons-exec.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.commons</groupId>
|
||||
<artifactId>commons-lang3</artifactId>
|
||||
<version>${commons-lang3.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.assertj</groupId>
|
||||
<artifactId>assertj-core</artifactId>
|
||||
<version>${assertj.version}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.junit.platform</groupId>
|
||||
<artifactId>junit-platform-runner</artifactId>
|
||||
<version>${junit.platform.version}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<properties>
|
||||
<eclipse.collections.version>7.1.0</eclipse.collections.version>
|
||||
<commons-collections4.version>4.1</commons-collections4.version>
|
||||
<assertj.version>3.11.1</assertj.version>
|
||||
<junit.platform.version>1.2.0</junit.platform.version>
|
||||
<commons-exec.version>1.3</commons-exec.version>
|
||||
</properties>
|
||||
</project>
|
|
@ -1,4 +1,4 @@
|
|||
package com.baeldung.combiningcollections;
|
||||
package com.baeldung.collections.combiningcollections;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.stream.Stream;
|
|
@ -1,4 +1,4 @@
|
|||
package com.baeldung.combiningcollections;
|
||||
package com.baeldung.collections.combiningcollections;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
|
@ -1,4 +1,4 @@
|
|||
package com.baeldung.combiningcollections;
|
||||
package com.baeldung.collections.combiningcollections;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.HashMap;
|
|
@ -1,4 +1,4 @@
|
|||
package com.baeldung.combiningcollections;
|
||||
package com.baeldung.collections.combiningcollections;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.HashSet;
|
|
@ -1,4 +1,4 @@
|
|||
package com.baeldung.java.filtering;
|
||||
package com.baeldung.collections.filtering;
|
||||
|
||||
import java.util.Collection;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package com.baeldung.java.filtering;
|
||||
package com.baeldung.collections.filtering;
|
||||
|
||||
import java.util.Collection;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package com.baeldung.java.filtering;
|
||||
package com.baeldung.collections.filtering;
|
||||
|
||||
import java.util.Collection;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package com.baeldung.java.filtering;
|
||||
package com.baeldung.collections.filtering;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.function.Predicate;
|
|
@ -1,4 +1,4 @@
|
|||
package com.baeldung.java.iterable;
|
||||
package com.baeldung.collections.iterablesize;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.stream.StreamSupport;
|
|
@ -1,4 +1,4 @@
|
|||
package com.baeldung.nullsafecollectionstreams;
|
||||
package com.baeldung.collections.nullsafecollectionstreams;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.stream.Stream;
|
|
@ -1,4 +1,4 @@
|
|||
package com.baeldung.nullsafecollectionstreams;
|
||||
package com.baeldung.collections.nullsafecollectionstreams;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.Optional;
|
|
@ -1,4 +1,4 @@
|
|||
package com.baeldung.nullsafecollectionstreams;
|
||||
package com.baeldung.collections.nullsafecollectionstreams;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.stream.Stream;
|
|
@ -1,4 +1,4 @@
|
|||
package com.baeldung.removal;
|
||||
package com.baeldung.collections.removal;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
|
@ -1,4 +1,4 @@
|
|||
package com.baeldung.removal;
|
||||
package com.baeldung.collections.removal;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
|
@ -1,4 +1,4 @@
|
|||
package com.baeldung.removal;
|
||||
package com.baeldung.collections.removal;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
|
@ -1,4 +1,4 @@
|
|||
package com.baeldung.removal;
|
||||
package com.baeldung.collections.removal;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
|
@ -1,4 +1,4 @@
|
|||
package com.baeldung.combiningcollections;
|
||||
package com.baeldung.collections.combiningcollections;
|
||||
|
||||
import static org.junit.Assert.*;
|
||||
import org.junit.Test;
|
|
@ -1,4 +1,4 @@
|
|||
package com.baeldung.combiningcollections;
|
||||
package com.baeldung.collections.combiningcollections;
|
||||
|
||||
import static org.hamcrest.CoreMatchers.is;
|
||||
import static org.junit.Assert.assertThat;
|
|
@ -1,4 +1,4 @@
|
|||
package com.baeldung.combiningcollections;
|
||||
package com.baeldung.collections.combiningcollections;
|
||||
|
||||
import static org.hamcrest.CoreMatchers.is;
|
||||
import static org.junit.Assert.assertThat;
|
|
@ -1,5 +1,5 @@
|
|||
|
||||
package com.baeldung.combiningcollections;
|
||||
package com.baeldung.collections.combiningcollections;
|
||||
|
||||
import static org.hamcrest.CoreMatchers.is;
|
||||
import static org.junit.Assert.assertThat;
|
|
@ -1,4 +1,4 @@
|
|||
package com.baeldung.java.filtering;
|
||||
package com.baeldung.collections.filtering;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package com.baeldung.java.iterable;
|
||||
package com.baeldung.collections.iterablesize;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package org.baeldung.java.collections;
|
||||
package com.baeldung.collections.joinsplit;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
|
@ -1,4 +1,4 @@
|
|||
package org.baeldung.java.collections;
|
||||
package com.baeldung.collections.joinsplit;
|
||||
|
||||
import org.junit.Test;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package org.baeldung.java.collections;
|
||||
package com.baeldung.collections.multiplecollections;
|
||||
|
||||
import com.google.common.collect.Iterables;
|
||||
import com.google.common.collect.Lists;
|
||||
|
@ -14,7 +14,7 @@ import java.util.stream.Stream;
|
|||
|
||||
import static java.util.Arrays.asList;
|
||||
|
||||
public class CollectionsConcatenateUnitTest {
|
||||
public class CombineMultipleCollectionsUnitTest {
|
||||
|
||||
@Test
|
||||
public void givenUsingJava8_whenConcatenatingUsingConcat_thenCorrect() {
|
|
@ -1,4 +1,4 @@
|
|||
package com.baeldung.nullsafecollectionstreams;
|
||||
package com.baeldung.collections.nullsafecollectionstreams;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Collection;
|
|
@ -1,4 +1,4 @@
|
|||
package com.baeldung.nullsafecollectionstreams;
|
||||
package com.baeldung.collections.nullsafecollectionstreams;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Collection;
|
|
@ -1,4 +1,4 @@
|
|||
package com.baeldung.nullsafecollectionstreams;
|
||||
package com.baeldung.collections.nullsafecollectionstreams;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Collection;
|
|
@ -1,4 +1,4 @@
|
|||
package com.baeldung.removal;
|
||||
package com.baeldung.collections.removal;
|
||||
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
|
@ -1,4 +1,4 @@
|
|||
package com.baeldung.shufflingcollections;
|
||||
package com.baeldung.collections.shufflingcollections;
|
||||
|
||||
import org.junit.Test;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package org.baeldung.java.sorting;
|
||||
package com.baeldung.collections.sorting;
|
||||
|
||||
public class Employee implements Comparable {
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package org.baeldung.java.sorting;
|
||||
package com.baeldung.collections.sorting;
|
||||
|
||||
import com.google.common.primitives.Ints;
|
||||
import org.apache.commons.lang3.ArrayUtils;
|
|
@ -0,0 +1,11 @@
|
|||
=========
|
||||
|
||||
## Core Java Collections Cookbooks and Examples
|
||||
|
||||
### Relevant Articles:
|
||||
- [Time Comparison of Arrays.sort(Object[]) and Arrays.sort(int[])](https://www.baeldung.com/arrays-sortobject-vs-sortint)
|
||||
- [Java ArrayList vs Vector](https://www.baeldung.com/java-arraylist-vs-vector)
|
||||
- [Differences Between HashMap and Hashtable](https://www.baeldung.com/hashmap-hashtable-differences)
|
||||
- [Differences Between Collection.clear() and Collection.removeAll()](https://www.baeldung.com/java-collection-clear-vs-removeall)
|
||||
- [Performance of contains() in a HashSet vs ArrayList](https://www.baeldung.com/java-hashset-arraylist-contains-performance)
|
||||
- [Fail-Safe Iterator vs Fail-Fast Iterator](https://www.baeldung.com/java-fail-safe-vs-fail-fast-iterator)
|
|
@ -0,0 +1,34 @@
|
|||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>core-java-collections-3</artifactId>
|
||||
<version>0.1.0-SNAPSHOT</version>
|
||||
<name>core-java-collections-3</name>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<parent>
|
||||
<groupId>com.baeldung</groupId>
|
||||
<artifactId>parent-java</artifactId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
<relativePath>../../parent-java</relativePath>
|
||||
</parent>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.openjdk.jmh</groupId>
|
||||
<artifactId>jmh-core</artifactId>
|
||||
<version>${openjdk.jmh.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.assertj</groupId>
|
||||
<artifactId>assertj-core</artifactId>
|
||||
<version>${assertj.version}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<properties>
|
||||
<openjdk.jmh.version>1.19</openjdk.jmh.version>
|
||||
<assertj.version>3.11.1</assertj.version>
|
||||
</properties>
|
||||
</project>
|
|
@ -1,4 +1,4 @@
|
|||
package com.baeldung.performance;
|
||||
package com.baeldung.collections.arraylistvsvector;
|
||||
|
||||
import org.openjdk.jmh.annotations.*;
|
||||
import org.openjdk.jmh.runner.Runner;
|
|
@ -0,0 +1,55 @@
|
|||
package com.baeldung.collections.arraylistvsvector;
|
||||
|
||||
public class Employee {
|
||||
|
||||
private Long id;
|
||||
private String name;
|
||||
|
||||
public Employee(Long id, String name) {
|
||||
this.name = name;
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (this == o) return true;
|
||||
if (o == null || getClass() != o.getClass()) return false;
|
||||
|
||||
Employee employee = (Employee) o;
|
||||
|
||||
if (!id.equals(employee.id)) return false;
|
||||
return name.equals(employee.name);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
int result = id.hashCode();
|
||||
result = 31 * result + name.hashCode();
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "Employee{" +
|
||||
"id=" + id +
|
||||
", name='" + name + '\'' +
|
||||
'}';
|
||||
}
|
||||
}
|
|
@ -1,4 +1,4 @@
|
|||
package com.baeldung.java.list;
|
||||
package com.baeldung.collections.arraylistvsvector;
|
||||
|
||||
import java.util.Enumeration;
|
||||
import java.util.Iterator;
|
|
@ -1,4 +1,4 @@
|
|||
package com.baeldung.performance;
|
||||
package com.baeldung.collections.containsperformance;
|
||||
|
||||
import org.openjdk.jmh.annotations.*;
|
||||
import org.openjdk.jmh.runner.Runner;
|
|
@ -0,0 +1,55 @@
|
|||
package com.baeldung.collections.containsperformance;
|
||||
|
||||
public class Employee {
|
||||
|
||||
private Long id;
|
||||
private String name;
|
||||
|
||||
public Employee(Long id, String name) {
|
||||
this.name = name;
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (this == o) return true;
|
||||
if (o == null || getClass() != o.getClass()) return false;
|
||||
|
||||
Employee employee = (Employee) o;
|
||||
|
||||
if (!id.equals(employee.id)) return false;
|
||||
return name.equals(employee.name);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
int result = id.hashCode();
|
||||
result = 31 * result + name.hashCode();
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "Employee{" +
|
||||
"id=" + id +
|
||||
", name='" + name + '\'' +
|
||||
'}';
|
||||
}
|
||||
}
|
|
@ -1,4 +1,4 @@
|
|||
package com.baeldung.iterators;
|
||||
package com.baeldung.collections.iterators;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Iterator;
|
|
@ -1,4 +1,4 @@
|
|||
package com.baeldung.performance;
|
||||
package com.baeldung.collections.sortingcomparison;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.concurrent.TimeUnit;
|
|
@ -1,4 +1,4 @@
|
|||
package com.baeldung.java.sort;
|
||||
package com.baeldung.collections.sortingcomparison;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
|
@ -1,4 +1,4 @@
|
|||
package com.baeldung.collection;
|
||||
package com.baeldung.collections.clearvsremoveall;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package com.baeldung.hashmapvshashtable;
|
||||
package com.baeldung.collections.hashmapvshashtable;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
|
|
@ -1,8 +1,8 @@
|
|||
package com.baeldung.iterators;
|
||||
package com.baeldung.collections.iterators;
|
||||
|
||||
import static com.baeldung.iterators.Iterators.failFast1;
|
||||
import static com.baeldung.iterators.Iterators.failFast2;
|
||||
import static com.baeldung.iterators.Iterators.failSafe1;
|
||||
import static com.baeldung.collections.iterators.Iterators.failFast1;
|
||||
import static com.baeldung.collections.iterators.Iterators.failFast2;
|
||||
import static com.baeldung.collections.iterators.Iterators.failSafe1;
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
import static org.assertj.core.api.Assertions.assertThatThrownBy;
|
||||
|
|
@ -11,4 +11,5 @@
|
|||
- [Remove the First Element from a List](http://www.baeldung.com/java-remove-first-element-from-list)
|
||||
- [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)
|
||||
- [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)
|
||||
- [Removing the First Element of an Array](https://www.baeldung.com/java-array-remove-first-element)
|
||||
|
|
|
@ -3,29 +3,13 @@
|
|||
## Core Java Collections Cookbooks and Examples
|
||||
|
||||
### Relevant Articles:
|
||||
- [Java – Combine Multiple Collections](http://www.baeldung.com/java-combine-multiple-collections)
|
||||
- [Collect a Java Stream to an Immutable Collection](http://www.baeldung.com/java-stream-immutable-collection)
|
||||
- [Introduction to the Java ArrayDeque](http://www.baeldung.com/java-array-deque)
|
||||
- [Getting the Size of an Iterable in Java](http://www.baeldung.com/java-iterable-size)
|
||||
- [How to Filter a Collection in Java](http://www.baeldung.com/java-collection-filtering)
|
||||
- [Removing the First Element of an Array](https://www.baeldung.com/java-array-remove-first-element)
|
||||
- [Fail-Safe Iterator vs Fail-Fast Iterator](http://www.baeldung.com/java-fail-safe-vs-fail-fast-iterator)
|
||||
- [Shuffling Collections In Java](http://www.baeldung.com/java-shuffle-collection)
|
||||
- [An Introduction to Java.util.Hashtable Class](http://www.baeldung.com/java-hash-table)
|
||||
- [Java Null-Safe Streams from Collections](https://www.baeldung.com/java-null-safe-streams-from-collections)
|
||||
- [Collect a Java Stream to an Immutable Collection](https://www.baeldung.com/java-stream-immutable-collection)
|
||||
- [Introduction to the Java ArrayDeque](https://www.baeldung.com/java-array-deque)
|
||||
- [An Introduction to Java.util.Hashtable Class](https://www.baeldung.com/java-hash-table)
|
||||
- [Thread Safe LIFO Data Structure Implementations](https://www.baeldung.com/java-lifo-thread-safe)
|
||||
- [Differences Between Collection.clear() and Collection.removeAll()](https://www.baeldung.com/java-collection-clear-vs-removeall)
|
||||
- [Performance of contains() in a HashSet vs ArrayList](https://www.baeldung.com/java-hashset-arraylist-contains-performance)
|
||||
- [Time Complexity of Java Collections](https://www.baeldung.com/java-collections-complexity)
|
||||
- [Operating on and Removing an Item from Stream](https://www.baeldung.com/java-use-remove-item-stream)
|
||||
- [An Introduction to Synchronized Java Collections](https://www.baeldung.com/java-synchronized-collections)
|
||||
- [Removing Elements from Java Collections](https://www.baeldung.com/java-collection-remove-elements)
|
||||
- [Combining Different Types of Collections in Java](https://www.baeldung.com/java-combine-collections)
|
||||
- [Sorting in Java](http://www.baeldung.com/java-sorting)
|
||||
- [Join and Split Arrays and Collections in Java](http://www.baeldung.com/java-join-and-split)
|
||||
- [A Guide to EnumMap](https://www.baeldung.com/java-enum-map)
|
||||
- [A Guide to Iterator in Java](http://www.baeldung.com/java-iterator)
|
||||
- [Differences Between HashMap and Hashtable](https://www.baeldung.com/hashmap-hashtable-differences)
|
||||
- [Java ArrayList vs Vector](https://www.baeldung.com/java-arraylist-vs-vector)
|
||||
- [A Guide to Iterator in Java](https://www.baeldung.com/java-iterator)
|
||||
- [Defining a Char Stack in Java](https://www.baeldung.com/java-char-stack)
|
||||
- [Time Comparison of Arrays.sort(Object[]) and Arrays.sort(int[])](https://www.baeldung.com/arrays-sortobject-vs-sortint)
|
||||
- [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)
|
||||
|
|
|
@ -14,33 +14,12 @@
|
|||
</parent>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.apache.commons</groupId>
|
||||
<artifactId>commons-collections4</artifactId>
|
||||
<version>${commons-collections4.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.commons</groupId>
|
||||
<artifactId>commons-lang3</artifactId>
|
||||
<version>${commons-lang3.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.eclipse.collections</groupId>
|
||||
<artifactId>eclipse-collections</artifactId>
|
||||
<version>${eclipse.collections.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.assertj</groupId>
|
||||
<artifactId>assertj-core</artifactId>
|
||||
<version>${assertj.version}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.junit.platform</groupId>
|
||||
<artifactId>junit-platform-runner</artifactId>
|
||||
<version>${junit.platform.version}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.openjdk.jmh</groupId>
|
||||
<artifactId>jmh-core</artifactId>
|
||||
|
@ -51,11 +30,6 @@
|
|||
<artifactId>jmh-generator-annprocess</artifactId>
|
||||
<version>${openjdk.jmh.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.commons</groupId>
|
||||
<artifactId>commons-exec</artifactId>
|
||||
<version>${commons-exec.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.projectlombok</groupId>
|
||||
<artifactId>lombok</artifactId>
|
||||
|
@ -66,13 +40,6 @@
|
|||
|
||||
<properties>
|
||||
<openjdk.jmh.version>1.19</openjdk.jmh.version>
|
||||
<junit.platform.version>1.2.0</junit.platform.version>
|
||||
<commons-lang3.version>3.8.1</commons-lang3.version>
|
||||
<commons-collections4.version>4.1</commons-collections4.version>
|
||||
<collections-generic.version>4.01</collections-generic.version>
|
||||
<avaitility.version>1.7.0</avaitility.version>
|
||||
<assertj.version>3.11.1</assertj.version>
|
||||
<eclipse.collections.version>7.1.0</eclipse.collections.version>
|
||||
<commons-exec.version>1.3</commons-exec.version>
|
||||
</properties>
|
||||
</project>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
package com.baeldung.synchronizedcollections.application;
|
||||
package com.baeldung.synchronizedcollections;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
|
@ -1,83 +0,0 @@
|
|||
package com.baeldung.java.collections;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.concurrent.CopyOnWriteArrayList;
|
||||
|
||||
import static java.util.Arrays.asList;
|
||||
import static org.junit.Assert.assertEquals;
|
||||
|
||||
public class ConcurrentModificationExceptionUnitTest {
|
||||
|
||||
@Test
|
||||
public void changingContentWithSetDoesNotThrowConcurrentModificationException() throws Exception {
|
||||
ArrayList<Object> array = new ArrayList<>(asList(0, "one", 2, "three"));
|
||||
|
||||
for (Object item : array) {
|
||||
array.set(3, 3);
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
public void removingElementUsingIteratorAPI() throws Exception {
|
||||
List<String> originalList = new ArrayList<>(asList("zero", "one", "two", "three"));
|
||||
|
||||
Iterator<String> iterator = originalList.iterator();
|
||||
|
||||
while (iterator.hasNext()) {
|
||||
String next = iterator.next();
|
||||
if (Objects.equals(next, "one")) iterator.remove();
|
||||
}
|
||||
|
||||
assertEquals(originalList, asList("zero", "two", "three"));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void modifyingContentAndIteratingUsingListIteratorAPI() throws Exception {
|
||||
List<String> originalList = new ArrayList<>(asList("zero", "one", "two", "three"));
|
||||
|
||||
ListIterator<String> iterator = originalList.listIterator();
|
||||
|
||||
while (iterator.hasNext()) {
|
||||
String next = iterator.next();
|
||||
if (Objects.equals(next, "one")) {
|
||||
iterator.set("another");
|
||||
}
|
||||
|
||||
if (Objects.equals(next, "two")) {
|
||||
iterator.remove();
|
||||
}
|
||||
|
||||
if (Objects.equals(next, "three")) {
|
||||
iterator.add("four");
|
||||
}
|
||||
}
|
||||
|
||||
assertEquals(originalList, asList("zero", "another", "three", "four"));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void removingElementUsingCopyAndListAPI() throws Exception {
|
||||
List<String> originalList = new ArrayList<>(asList("zero", "one", "two", "three"));
|
||||
|
||||
List<String> listCopy = new ArrayList<>(originalList);
|
||||
|
||||
for (String next : listCopy) {
|
||||
if (Objects.equals(next, "one")) originalList.remove(originalList.indexOf(next) - 1);
|
||||
}
|
||||
|
||||
assertEquals(originalList, asList("one", "two", "three"));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void copyOnWriteList() throws Exception {
|
||||
List<String> originalList = new CopyOnWriteArrayList<>(asList("zero", "one", "two", "three"));
|
||||
|
||||
for (String next : originalList) {
|
||||
if (Objects.equals(next, "one")) originalList.remove(originalList.indexOf(next) - 1);
|
||||
}
|
||||
|
||||
assertEquals(originalList, asList("one", "two", "three"));
|
||||
}
|
||||
}
|
|
@ -1,4 +1,4 @@
|
|||
package com.baeldung.synchronizedcollections.test;
|
||||
package com.baeldung.synchronizedcollections;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
|
@ -1,4 +1,4 @@
|
|||
package com.baeldung.synchronizedcollections.test;
|
||||
package com.baeldung.synchronizedcollections;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
|
@ -1,4 +1,4 @@
|
|||
package com.baeldung.synchronizedcollections.test;
|
||||
package com.baeldung.synchronizedcollections;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.HashMap;
|
|
@ -1,4 +1,4 @@
|
|||
package com.baeldung.synchronizedcollections.test;
|
||||
package com.baeldung.synchronizedcollections;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
|
@ -1,4 +1,4 @@
|
|||
package com.baeldung.synchronizedcollections.test;
|
||||
package com.baeldung.synchronizedcollections;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.Map;
|
|
@ -1,4 +1,4 @@
|
|||
package com.baeldung.synchronizedcollections.test;
|
||||
package com.baeldung.synchronizedcollections;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
|
@ -1,3 +0,0 @@
|
|||
### Relevant Articles:
|
||||
- [Join and Split Arrays and Collections in Java](http://www.baeldung.com/java-join-and-split)
|
||||
- [Introduction to Java Servlets](http://www.baeldung.com/intro-to-servlets)
|
|
@ -1,6 +1,7 @@
|
|||
=========
|
||||
## Java Blockchain
|
||||
|
||||
## Basic Implementation of Blockchian in Java
|
||||
This module contains articles about Blockchain in Java
|
||||
|
||||
### Relevant Articles:
|
||||
- []()
|
||||
|
||||
- [Implementing a Simple Blockchain in Java](https://www.baeldung.com/java-blockchain)
|
||||
|
|
|
@ -0,0 +1,13 @@
|
|||
## Apache Commons Collections
|
||||
|
||||
This module contains articles about Apache Commons Collections
|
||||
|
||||
### Relevant articles
|
||||
|
||||
- [Apache Commons Collections SetUtils](https://www.baeldung.com/apache-commons-setutils)
|
||||
- [Apache Commons Collections OrderedMap](https://www.baeldung.com/apache-commons-ordered-map)
|
||||
- [Guide to Apache Commons CircularFifoQueue](https://www.baeldung.com/commons-circular-fifo-queue)
|
||||
- [Apache Commons Collections Bag](https://www.baeldung.com/apache-commons-bag)
|
||||
- [A Guide to Apache Commons Collections CollectionUtils](https://www.baeldung.com/apache-commons-collection-utils)
|
||||
- [Apache Commons Collections BidiMap](https://www.baeldung.com/commons-collections-bidi-map)
|
||||
- [Apache Commons Collections MapUtils](https://www.baeldung.com/apache-commons-map-utils)
|
|
@ -0,0 +1,40 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>libraries-apache-commons-collections</artifactId>
|
||||
<name>libraries-apache-commons-collections</name>
|
||||
|
||||
<parent>
|
||||
<artifactId>parent-modules</artifactId>
|
||||
<groupId>com.baeldung</groupId>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.apache.commons</groupId>
|
||||
<artifactId>commons-collections4</artifactId>
|
||||
<version>${commons.collections.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.hamcrest</groupId>
|
||||
<artifactId>java-hamcrest</artifactId>
|
||||
<version>${org.hamcrest.java-hamcrest.version}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.assertj</groupId>
|
||||
<artifactId>assertj-core</artifactId>
|
||||
<version>${assertj.version}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<properties>
|
||||
<commons.collections.version>4.1</commons.collections.version>
|
||||
<assertj.version>3.6.2</assertj.version>
|
||||
<org.hamcrest.java-hamcrest.version>2.0.0.0</org.hamcrest.java-hamcrest.version>
|
||||
</properties>
|
||||
|
||||
</project>
|
|
@ -1,4 +1,4 @@
|
|||
package com.baeldung.commons.collectionutil;
|
||||
package com.baeldung.commons.collections.collectionutils;
|
||||
|
||||
public class Address {
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package com.baeldung.commons.collectionutil;
|
||||
package com.baeldung.commons.collections.collectionutils;
|
||||
|
||||
public class Customer implements Comparable<Customer> {
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package com.baeldung.commons.collections4;
|
||||
package com.baeldung.commons.collections;
|
||||
|
||||
import org.apache.commons.collections4.Bag;
|
||||
import org.apache.commons.collections4.SortedBag;
|
|
@ -1,4 +1,4 @@
|
|||
package com.baeldung.circularfifoqueue;
|
||||
package com.baeldung.commons.collections.circularfifoqueue;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
|
@ -1,7 +1,7 @@
|
|||
package com.baeldung.commons.collections;
|
||||
package com.baeldung.commons.collections.collectionutils;
|
||||
|
||||
import com.baeldung.commons.collectionutil.Address;
|
||||
import com.baeldung.commons.collectionutil.Customer;
|
||||
import com.baeldung.commons.collections.collectionutils.Address;
|
||||
import com.baeldung.commons.collections.collectionutils.Customer;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.apache.commons.collections4.Predicate;
|
||||
import org.apache.commons.collections4.Transformer;
|
|
@ -1,211 +1,211 @@
|
|||
package com.baeldung.commons.collections.orderedmap;
|
||||
|
||||
import org.apache.commons.collections4.OrderedMap;
|
||||
import org.apache.commons.collections4.OrderedMapIterator;
|
||||
import org.apache.commons.collections4.map.LinkedMap;
|
||||
import org.apache.commons.collections4.map.ListOrderedMap;
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
|
||||
public class OrderedMapUnitTest {
|
||||
|
||||
private String[] names = { "Emily", "Mathew", "Rose", "John", "Anna" };
|
||||
private Integer[] ages = { 37, 28, 40, 36, 21 };
|
||||
|
||||
private int RUNNERS_COUNT = names.length;
|
||||
|
||||
private OrderedMap<String, Integer> runnersLinkedMap;
|
||||
private OrderedMap<String, Integer> runnersListOrderedMap;
|
||||
|
||||
@Before
|
||||
public void createRunners() {
|
||||
// First implementation: ListOrderedMap
|
||||
this.runnersListOrderedMap = new ListOrderedMap<>();
|
||||
this.loadOrderedMapOfRunners(this.runnersListOrderedMap);
|
||||
|
||||
// Second implementation: LinkedMap
|
||||
this.runnersLinkedMap = new LinkedMap<>();
|
||||
this.loadOrderedMapOfRunners(this.runnersLinkedMap);
|
||||
}
|
||||
|
||||
private void loadOrderedMapOfRunners(OrderedMap<String, Integer> runners) {
|
||||
for (int i = 0; i < RUNNERS_COUNT; i++) {
|
||||
runners.put(this.names[i], this.ages[i]);
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
public void givenALinkedMap_whenIteratedWithMapIterator_thenPreservesOrder() {
|
||||
// Tests that the order in map iterator is the same
|
||||
// as defined in the constant arrays of names and ages:
|
||||
|
||||
OrderedMapIterator<String, Integer> runnersIterator = this.runnersLinkedMap.mapIterator();
|
||||
int i = 0;
|
||||
while (runnersIterator.hasNext()) {
|
||||
runnersIterator.next();
|
||||
assertEquals(runnersIterator.getKey(), this.names[i]);
|
||||
assertEquals(runnersIterator.getValue(), this.ages[i]);
|
||||
i++;
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
public void givenAListOrderedMap_whenIteratedWithMapIterator_thenPreservesOrder() {
|
||||
// Tests that the order in map iterator is the same
|
||||
// as defined in the constant arrays of names and ages:
|
||||
|
||||
OrderedMapIterator<String, Integer> runnersIterator = this.runnersListOrderedMap.mapIterator();
|
||||
int i = 0;
|
||||
while (runnersIterator.hasNext()) {
|
||||
runnersIterator.next();
|
||||
assertEquals(runnersIterator.getKey(), this.names[i]);
|
||||
assertEquals(runnersIterator.getValue(), this.ages[i]);
|
||||
i++;
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
public void givenALinkedMap_whenIteratedForwards_thenPreservesOrder() {
|
||||
// Tests that the order in the forward iteration is the same
|
||||
// as defined in the constant arrays of names and ages
|
||||
|
||||
String name = this.runnersLinkedMap.firstKey();
|
||||
int i = 0;
|
||||
while (name != null) {
|
||||
assertEquals(name, this.names[i]);
|
||||
name = this.runnersLinkedMap.nextKey(name);
|
||||
i++;
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
public void givenAListOrderedMap_whenIteratedForwards_thenPreservesOrder() {
|
||||
// Tests that the order in the forward iteration is the same
|
||||
// as defined in the constant arrays of names and ages
|
||||
|
||||
String name = this.runnersListOrderedMap.firstKey();
|
||||
int i = 0;
|
||||
while (name != null) {
|
||||
assertEquals(name, this.names[i]);
|
||||
name = this.runnersListOrderedMap.nextKey(name);
|
||||
i++;
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
public void givenALinkedMap_whenIteratedBackwards_thenPreservesOrder() {
|
||||
// Tests that the order in the backwards iteration is the same
|
||||
// as defined in the constant arrays of names and ages
|
||||
|
||||
String name = this.runnersLinkedMap.lastKey();
|
||||
int i = RUNNERS_COUNT - 1;
|
||||
while (name != null) {
|
||||
assertEquals(name, this.names[i]);
|
||||
name = this.runnersLinkedMap.previousKey(name);
|
||||
i--;
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
public void givenAListOrderedMap_whenIteratedBackwards_thenPreservesOrder() {
|
||||
// Tests that the order in the backwards iteration is the same
|
||||
// as defined in the constant arrays of names and ages
|
||||
|
||||
String name = this.runnersListOrderedMap.lastKey();
|
||||
int i = RUNNERS_COUNT - 1;
|
||||
while (name != null) {
|
||||
assertEquals(name, this.names[i]);
|
||||
name = this.runnersListOrderedMap.previousKey(name);
|
||||
i--;
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
public void givenALinkedMap_whenObjectIsSearched_thenMatchesConstantArray() {
|
||||
assertEquals(ages[4], this.runnersLinkedMap.get("Anna"));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void givenALinkedMap_whenConvertedToList_thenMatchesKeySet() {
|
||||
// Casting the OrderedMap to a LinkedMap we can use asList() method
|
||||
|
||||
LinkedMap<String, Integer> lmap = (LinkedMap<String, Integer>) this.runnersLinkedMap;
|
||||
List<String> listKeys = new ArrayList<>();
|
||||
listKeys.addAll(this.runnersLinkedMap.keySet());
|
||||
List<String> linkedMap = lmap.asList();
|
||||
assertEquals(listKeys, linkedMap);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void givenALinkedMap_whenSearchByIndexIsUsed_thenMatchesConstantArray() {
|
||||
LinkedMap<String, Integer> lmap = (LinkedMap<String, Integer>) this.runnersLinkedMap;
|
||||
|
||||
for (int i = 0; i < RUNNERS_COUNT; i++) {
|
||||
// accessed by index:
|
||||
String name = lmap.get(i);
|
||||
assertEquals(name, this.names[i]);
|
||||
|
||||
// index of key concides with position in array
|
||||
assertEquals(lmap.indexOf(this.names[i]), i);
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
public void givenALinkedMap_whenElementRemoved_thenSizeDecrease() {
|
||||
LinkedMap<String, Integer> lmap = (LinkedMap<String, Integer>) this.runnersLinkedMap;
|
||||
Integer johnAge = lmap.remove("John");// by object
|
||||
assertEquals(johnAge, new Integer(36));
|
||||
assertEquals(lmap.size(), RUNNERS_COUNT - 1);
|
||||
|
||||
Integer emilyAge = lmap.remove(0);// by index
|
||||
assertEquals(emilyAge, new Integer(37));
|
||||
assertEquals(lmap.size(), RUNNERS_COUNT - 2);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void givenAListOrderedMap_whenObjectIsSearched_thenMatchesConstantArray() {
|
||||
assertEquals(ages[4], this.runnersListOrderedMap.get("Anna"));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void givenAListOrderedMap_whenConvertedToList_thenMatchesKeySet() {
|
||||
ListOrderedMap<String, Integer> lomap = (ListOrderedMap<String, Integer>) this.runnersListOrderedMap;
|
||||
List<String> listKeys = new ArrayList<>();
|
||||
listKeys.addAll(this.runnersListOrderedMap.keySet());
|
||||
List<String> lomapList = lomap.asList();
|
||||
assertEquals(listKeys, lomapList);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void givenAListOrderedMap_whenSearchByIndexIsUsed_thenMatchesConstantArray() {
|
||||
ListOrderedMap<String, Integer> lomap = (ListOrderedMap<String, Integer>) this.runnersListOrderedMap;
|
||||
|
||||
for (int i = 0; i < RUNNERS_COUNT; i++) {
|
||||
// accessed by index:
|
||||
String name = lomap.get(i);
|
||||
assertEquals(name, this.names[i]);
|
||||
|
||||
// index of key concides with position in array
|
||||
assertEquals(lomap.indexOf(this.names[i]), i);
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
public void givenAListOrderedMap_whenElementRemoved_thenSizeDecrease() {
|
||||
ListOrderedMap<String, Integer> lomap = (ListOrderedMap<String, Integer>) this.runnersListOrderedMap;
|
||||
|
||||
Integer johnAge = lomap.remove("John");// by object
|
||||
|
||||
assertEquals(johnAge, new Integer(36));
|
||||
assertEquals(lomap.size(), RUNNERS_COUNT - 1);
|
||||
|
||||
Integer emilyAge = lomap.remove(0);// by index
|
||||
assertEquals(emilyAge, new Integer(37));
|
||||
assertEquals(lomap.size(), RUNNERS_COUNT - 2);
|
||||
}
|
||||
}
|
||||
package com.baeldung.commons.collections.orderedmap;
|
||||
|
||||
import org.apache.commons.collections4.OrderedMap;
|
||||
import org.apache.commons.collections4.OrderedMapIterator;
|
||||
import org.apache.commons.collections4.map.LinkedMap;
|
||||
import org.apache.commons.collections4.map.ListOrderedMap;
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
|
||||
public class OrderedMapUnitTest {
|
||||
|
||||
private String[] names = { "Emily", "Mathew", "Rose", "John", "Anna" };
|
||||
private Integer[] ages = { 37, 28, 40, 36, 21 };
|
||||
|
||||
private int RUNNERS_COUNT = names.length;
|
||||
|
||||
private OrderedMap<String, Integer> runnersLinkedMap;
|
||||
private OrderedMap<String, Integer> runnersListOrderedMap;
|
||||
|
||||
@Before
|
||||
public void createRunners() {
|
||||
// First implementation: ListOrderedMap
|
||||
this.runnersListOrderedMap = new ListOrderedMap<>();
|
||||
this.loadOrderedMapOfRunners(this.runnersListOrderedMap);
|
||||
|
||||
// Second implementation: LinkedMap
|
||||
this.runnersLinkedMap = new LinkedMap<>();
|
||||
this.loadOrderedMapOfRunners(this.runnersLinkedMap);
|
||||
}
|
||||
|
||||
private void loadOrderedMapOfRunners(OrderedMap<String, Integer> runners) {
|
||||
for (int i = 0; i < RUNNERS_COUNT; i++) {
|
||||
runners.put(this.names[i], this.ages[i]);
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
public void givenALinkedMap_whenIteratedWithMapIterator_thenPreservesOrder() {
|
||||
// Tests that the order in map iterator is the same
|
||||
// as defined in the constant arrays of names and ages:
|
||||
|
||||
OrderedMapIterator<String, Integer> runnersIterator = this.runnersLinkedMap.mapIterator();
|
||||
int i = 0;
|
||||
while (runnersIterator.hasNext()) {
|
||||
runnersIterator.next();
|
||||
assertEquals(runnersIterator.getKey(), this.names[i]);
|
||||
assertEquals(runnersIterator.getValue(), this.ages[i]);
|
||||
i++;
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
public void givenAListOrderedMap_whenIteratedWithMapIterator_thenPreservesOrder() {
|
||||
// Tests that the order in map iterator is the same
|
||||
// as defined in the constant arrays of names and ages:
|
||||
|
||||
OrderedMapIterator<String, Integer> runnersIterator = this.runnersListOrderedMap.mapIterator();
|
||||
int i = 0;
|
||||
while (runnersIterator.hasNext()) {
|
||||
runnersIterator.next();
|
||||
assertEquals(runnersIterator.getKey(), this.names[i]);
|
||||
assertEquals(runnersIterator.getValue(), this.ages[i]);
|
||||
i++;
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
public void givenALinkedMap_whenIteratedForwards_thenPreservesOrder() {
|
||||
// Tests that the order in the forward iteration is the same
|
||||
// as defined in the constant arrays of names and ages
|
||||
|
||||
String name = this.runnersLinkedMap.firstKey();
|
||||
int i = 0;
|
||||
while (name != null) {
|
||||
assertEquals(name, this.names[i]);
|
||||
name = this.runnersLinkedMap.nextKey(name);
|
||||
i++;
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
public void givenAListOrderedMap_whenIteratedForwards_thenPreservesOrder() {
|
||||
// Tests that the order in the forward iteration is the same
|
||||
// as defined in the constant arrays of names and ages
|
||||
|
||||
String name = this.runnersListOrderedMap.firstKey();
|
||||
int i = 0;
|
||||
while (name != null) {
|
||||
assertEquals(name, this.names[i]);
|
||||
name = this.runnersListOrderedMap.nextKey(name);
|
||||
i++;
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
public void givenALinkedMap_whenIteratedBackwards_thenPreservesOrder() {
|
||||
// Tests that the order in the backwards iteration is the same
|
||||
// as defined in the constant arrays of names and ages
|
||||
|
||||
String name = this.runnersLinkedMap.lastKey();
|
||||
int i = RUNNERS_COUNT - 1;
|
||||
while (name != null) {
|
||||
assertEquals(name, this.names[i]);
|
||||
name = this.runnersLinkedMap.previousKey(name);
|
||||
i--;
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
public void givenAListOrderedMap_whenIteratedBackwards_thenPreservesOrder() {
|
||||
// Tests that the order in the backwards iteration is the same
|
||||
// as defined in the constant arrays of names and ages
|
||||
|
||||
String name = this.runnersListOrderedMap.lastKey();
|
||||
int i = RUNNERS_COUNT - 1;
|
||||
while (name != null) {
|
||||
assertEquals(name, this.names[i]);
|
||||
name = this.runnersListOrderedMap.previousKey(name);
|
||||
i--;
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
public void givenALinkedMap_whenObjectIsSearched_thenMatchesConstantArray() {
|
||||
assertEquals(ages[4], this.runnersLinkedMap.get("Anna"));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void givenALinkedMap_whenConvertedToList_thenMatchesKeySet() {
|
||||
// Casting the OrderedMap to a LinkedMap we can use asList() method
|
||||
|
||||
LinkedMap<String, Integer> lmap = (LinkedMap<String, Integer>) this.runnersLinkedMap;
|
||||
List<String> listKeys = new ArrayList<>();
|
||||
listKeys.addAll(this.runnersLinkedMap.keySet());
|
||||
List<String> linkedMap = lmap.asList();
|
||||
assertEquals(listKeys, linkedMap);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void givenALinkedMap_whenSearchByIndexIsUsed_thenMatchesConstantArray() {
|
||||
LinkedMap<String, Integer> lmap = (LinkedMap<String, Integer>) this.runnersLinkedMap;
|
||||
|
||||
for (int i = 0; i < RUNNERS_COUNT; i++) {
|
||||
// accessed by index:
|
||||
String name = lmap.get(i);
|
||||
assertEquals(name, this.names[i]);
|
||||
|
||||
// index of key concides with position in array
|
||||
assertEquals(lmap.indexOf(this.names[i]), i);
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
public void givenALinkedMap_whenElementRemoved_thenSizeDecrease() {
|
||||
LinkedMap<String, Integer> lmap = (LinkedMap<String, Integer>) this.runnersLinkedMap;
|
||||
Integer johnAge = lmap.remove("John");// by object
|
||||
assertEquals(johnAge, new Integer(36));
|
||||
assertEquals(lmap.size(), RUNNERS_COUNT - 1);
|
||||
|
||||
Integer emilyAge = lmap.remove(0);// by index
|
||||
assertEquals(emilyAge, new Integer(37));
|
||||
assertEquals(lmap.size(), RUNNERS_COUNT - 2);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void givenAListOrderedMap_whenObjectIsSearched_thenMatchesConstantArray() {
|
||||
assertEquals(ages[4], this.runnersListOrderedMap.get("Anna"));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void givenAListOrderedMap_whenConvertedToList_thenMatchesKeySet() {
|
||||
ListOrderedMap<String, Integer> lomap = (ListOrderedMap<String, Integer>) this.runnersListOrderedMap;
|
||||
List<String> listKeys = new ArrayList<>();
|
||||
listKeys.addAll(this.runnersListOrderedMap.keySet());
|
||||
List<String> lomapList = lomap.asList();
|
||||
assertEquals(listKeys, lomapList);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void givenAListOrderedMap_whenSearchByIndexIsUsed_thenMatchesConstantArray() {
|
||||
ListOrderedMap<String, Integer> lomap = (ListOrderedMap<String, Integer>) this.runnersListOrderedMap;
|
||||
|
||||
for (int i = 0; i < RUNNERS_COUNT; i++) {
|
||||
// accessed by index:
|
||||
String name = lomap.get(i);
|
||||
assertEquals(name, this.names[i]);
|
||||
|
||||
// index of key concides with position in array
|
||||
assertEquals(lomap.indexOf(this.names[i]), i);
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
public void givenAListOrderedMap_whenElementRemoved_thenSizeDecrease() {
|
||||
ListOrderedMap<String, Integer> lomap = (ListOrderedMap<String, Integer>) this.runnersListOrderedMap;
|
||||
|
||||
Integer johnAge = lomap.remove("John");// by object
|
||||
|
||||
assertEquals(johnAge, new Integer(36));
|
||||
assertEquals(lomap.size(), RUNNERS_COUNT - 1);
|
||||
|
||||
Integer emilyAge = lomap.remove(0);// by index
|
||||
assertEquals(emilyAge, new Integer(37));
|
||||
assertEquals(lomap.size(), RUNNERS_COUNT - 2);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,7 @@
|
|||
## Apache Commons Collections
|
||||
|
||||
This module contains articles about Apache Commons IO
|
||||
|
||||
### Relevant articles
|
||||
- [Apache Commons IO](https://www.baeldung.com/apache-commons-io)
|
||||
- [Introduction to Apache Commons CSV](https://www.baeldung.com/apache-commons-csv)
|
|
@ -0,0 +1,31 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>libraries-apache-commons-io</artifactId>
|
||||
<name>libraries-apache-commons-io</name>
|
||||
|
||||
<parent>
|
||||
<artifactId>parent-modules</artifactId>
|
||||
<groupId>com.baeldung</groupId>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.apache.commons</groupId>
|
||||
<artifactId>commons-csv</artifactId>
|
||||
<version>${commons-csv.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>commons-io</groupId>
|
||||
<artifactId>commons-io</artifactId>
|
||||
<version>${commons-io.version}</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<properties>
|
||||
<commons-csv.version>1.4</commons-csv.version>
|
||||
</properties>
|
||||
|
||||
</project>
|
|
@ -1,4 +1,4 @@
|
|||
package com.baeldung.commons.csv;
|
||||
package com.baeldung.commons.io.csv;
|
||||
|
||||
import org.apache.commons.csv.CSVFormat;
|
||||
import org.apache.commons.csv.CSVPrinter;
|
|
@ -1,9 +0,0 @@
|
|||
*.class
|
||||
|
||||
# Folders #
|
||||
/gensrc
|
||||
/target
|
||||
|
||||
# Packaged files #
|
||||
*.jar
|
||||
/bin/
|
|
@ -1,20 +1,11 @@
|
|||
### Relevant articles
|
||||
|
||||
- [Array Processing with Apache Commons Lang 3](http://www.baeldung.com/array-processing-commons-lang)
|
||||
- [String Processing with Apache Commons Lang 3](http://www.baeldung.com/string-processing-commons-lang)
|
||||
- [Introduction to Apache Commons Math](http://www.baeldung.com/apache-commons-math)
|
||||
- [Apache Commons Collections SetUtils](http://www.baeldung.com/apache-commons-setutils)
|
||||
- [Apache Commons Collections OrderedMap](http://www.baeldung.com/apache-commons-ordered-map)
|
||||
- [Introduction to Apache Commons Text](http://www.baeldung.com/java-apache-commons-text)
|
||||
- [A Guide to Apache Commons DbUtils](http://www.baeldung.com/apache-commons-dbutils)
|
||||
- [Guide to Apache Commons CircularFifoQueue](http://www.baeldung.com/commons-circular-fifo-queue)
|
||||
- [Apache Commons Chain](http://www.baeldung.com/apache-commons-chain)
|
||||
- [Introduction to Apache Commons CSV](http://www.baeldung.com/apache-commons-csv)
|
||||
- [Apache Commons IO](http://www.baeldung.com/apache-commons-io)
|
||||
- [Apache Commons Collections Bag](http://www.baeldung.com/apache-commons-bag)
|
||||
- [A Guide to Apache Commons Collections CollectionUtils](http://www.baeldung.com/apache-commons-collection-utils)
|
||||
- [Apache Commons BeanUtils](http://www.baeldung.com/apache-commons-beanutils)
|
||||
- [Apache Commons Collections BidiMap](http://www.baeldung.com/commons-collections-bidi-map)
|
||||
- [Apache Commons Collections MapUtils](http://www.baeldung.com/apache-commons-map-utils)
|
||||
- [Histograms with Apache Commons Frequency](http://www.baeldung.com/apache-commons-frequency)
|
||||
- [Array Processing with Apache Commons Lang 3](https://www.baeldung.com/array-processing-commons-lang)
|
||||
- [String Processing with Apache Commons Lang 3](https://www.baeldung.com/string-processing-commons-lang)
|
||||
- [Introduction to Apache Commons Math](https://www.baeldung.com/apache-commons-math)
|
||||
- [Introduction to Apache Commons Text](https://www.baeldung.com/java-apache-commons-text)
|
||||
- [A Guide to Apache Commons DbUtils](https://www.baeldung.com/apache-commons-dbutils)
|
||||
- [Apache Commons Chain](https://www.baeldung.com/apache-commons-chain)
|
||||
- [Apache Commons BeanUtils](https://www.baeldung.com/apache-commons-beanutils)
|
||||
- [Histograms with Apache Commons Frequency](https://www.baeldung.com/apache-commons-frequency)
|
||||
- [An Introduction to Apache Commons Lang 3](https://www.baeldung.com/java-commons-lang-3)
|
|
@ -32,21 +32,11 @@
|
|||
<artifactId>commons-text</artifactId>
|
||||
<version>${commons-text.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>commons-io</groupId>
|
||||
<artifactId>commons-io</artifactId>
|
||||
<version>${commons-io.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>commons-chain</groupId>
|
||||
<artifactId>commons-chain</artifactId>
|
||||
<version>${commons-chain.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.commons</groupId>
|
||||
<artifactId>commons-csv</artifactId>
|
||||
<version>${commons-csv.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>commons-dbutils</groupId>
|
||||
<artifactId>commons-dbutils</artifactId>
|
||||
|
@ -72,18 +62,6 @@
|
|||
<artifactId>xchart</artifactId>
|
||||
<version>${xchart-version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.commons</groupId>
|
||||
<artifactId>commons-collections4</artifactId>
|
||||
<version>${commons.collections.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.hamcrest</groupId>
|
||||
<artifactId>java-hamcrest</artifactId>
|
||||
<version>${org.hamcrest.java-hamcrest.version}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
<properties>
|
||||
|
@ -91,11 +69,8 @@
|
|||
<commons-text.version>1.1</commons-text.version>
|
||||
<commons-beanutils.version>1.9.3</commons-beanutils.version>
|
||||
<commons-chain.version>1.2</commons-chain.version>
|
||||
<commons-csv.version>1.4</commons-csv.version>
|
||||
<assertj.version>3.6.2</assertj.version>
|
||||
<commons.dbutils.version>1.6</commons.dbutils.version>
|
||||
<commons.collections.version>4.1</commons.collections.version>
|
||||
<org.hamcrest.java-hamcrest.version>2.0.0.0</org.hamcrest.java-hamcrest.version>
|
||||
<commons-codec-version>1.10.L001</commons-codec-version>
|
||||
<xchart-version>3.5.2</xchart-version>
|
||||
<commons-net.version>3.6</commons-net.version>
|
||||
|
|
|
@ -43,6 +43,12 @@
|
|||
<artifactId>serenity-rest-assured</artifactId>
|
||||
<version>${serenity.version}</version>
|
||||
<scope>test</scope>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>io.rest-assured</groupId>
|
||||
<artifactId>rest-assured</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>net.serenity-bdd</groupId>
|
||||
|
@ -162,15 +168,15 @@
|
|||
</build>
|
||||
|
||||
<properties>
|
||||
<serenity.version>1.9.26</serenity.version>
|
||||
<serenity.jbehave.version>1.41.0</serenity.jbehave.version>
|
||||
<serenity.version>1.9.9</serenity.version>
|
||||
<serenity.jbehave.version>1.9.0</serenity.jbehave.version>
|
||||
<serenity.jira.version>1.9.0</serenity.jira.version>
|
||||
<serenity.plugin.version>1.9.27</serenity.plugin.version>
|
||||
<jsonassert.version>1.5.0</jsonassert.version>
|
||||
<awaitility.version>3.0.0</awaitility.version>
|
||||
<hoverfly-java.version>0.8.1</hoverfly-java.version>
|
||||
<spring.version>4.3.8.RELEASE</spring.version>
|
||||
<spring-mock-mvc.version>3.0.3</spring-mock-mvc.version>
|
||||
<spring-mock-mvc.version>4.1.1</spring-mock-mvc.version>
|
||||
<assertj.version>3.6.2</assertj.version>
|
||||
<java-hamcrest.version>2.0.0.0</java-hamcrest.version>
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
package org.baeldung.hamcrest;
|
||||
package com.baeldung.hamcrest;
|
||||
|
||||
public class Animal {
|
||||
String name;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
package org.baeldung.hamcrest;
|
||||
package com.baeldung.hamcrest;
|
||||
|
||||
public class Cat extends Animal {
|
||||
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
package org.baeldung.hamcrest;
|
||||
package com.baeldung.hamcrest;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
import static org.baeldung.hamcrest.IsPositiveInteger.isAPositiveInteger;
|
||||
import static com.baeldung.hamcrest.IsPositiveInteger.isAPositiveInteger;
|
||||
import static org.hamcrest.MatcherAssert.assertThat;
|
||||
import static org.hamcrest.Matchers.*;
|
||||
import static org.hamcrest.beans.HasProperty.hasProperty;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
package org.baeldung.hamcrest;
|
||||
package com.baeldung.hamcrest;
|
||||
|
||||
import org.hamcrest.Description;
|
||||
import org.hamcrest.Factory;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
package org.baeldung.hamcrest;
|
||||
package com.baeldung.hamcrest;
|
||||
|
||||
public class Person {
|
||||
String name;
|
||||
|
|
|
@ -0,0 +1,19 @@
|
|||
#!/bin/bash
|
||||
|
||||
my_var="Hola Mundo"
|
||||
echo ${my_var}
|
||||
|
||||
my_filename="interesting-text-file.txt"
|
||||
echo ${my_filename:0:21}
|
||||
|
||||
echo ${my_filename%.*}
|
||||
|
||||
complicated_filename="hello-world.tar.gz"
|
||||
echo ${complicated_filename%%.*}
|
||||
|
||||
echo ${my_filename/.*/}
|
||||
|
||||
echo 'interesting-text-file.txt' | sed 's/.txt*//'
|
||||
|
||||
echo 'interesting-text-file.txt' | cut -f1 -d"."
|
||||
echo ${complicated_filename} | cut -f1 -d"."
|
|
@ -1,2 +1,3 @@
|
|||
## Parent Boot 1
|
||||
|
||||
This is a parent module for all projects using Spring Boot 1.
|
||||
|
|
|
@ -1,2 +1,3 @@
|
|||
## Parent Boot 2
|
||||
|
||||
This is a parent module for all projects using Spring Boot 2.
|
||||
|
|
|
@ -1 +1,3 @@
|
|||
## Relevant Articles:
|
||||
## Parent Java
|
||||
|
||||
This is a parent module for all projects using Java
|
|
@ -1,2 +1,3 @@
|
|||
## Parent Kotlin
|
||||
|
||||
Parent module for Kotlin projects.
|
||||
This is a parent module for all projects using Kotlin
|
||||
|
|
|
@ -1 +1,3 @@
|
|||
## Relevant Articles:
|
||||
## Parent Spring 4
|
||||
|
||||
This is a parent module for all projects using Spring 4
|
||||
|
|
|
@ -1 +1,3 @@
|
|||
## Relevant Articles:
|
||||
## Parent Spring 5
|
||||
|
||||
This is a parent module for all projects using Spring 5
|
||||
|
|
10
pom.xml
10
pom.xml
|
@ -401,6 +401,8 @@
|
|||
<module>core-java-modules/core-java-arrays</module>
|
||||
<module>core-java-modules/core-java-arrays-2</module>
|
||||
<module>core-java-modules/core-java-collections</module>
|
||||
<module>core-java-modules/core-java-collections-2</module>
|
||||
<module>core-java-modules/core-java-collections-3</module>
|
||||
<module>core-java-modules/core-java-collections-list</module>
|
||||
<module>core-java-modules/core-java-collections-list-2</module>
|
||||
<module>core-java-modules/core-java-collections-list-3</module>
|
||||
|
@ -528,6 +530,8 @@
|
|||
<module>libraries-data</module>
|
||||
<module>libraries-data-2</module>
|
||||
<module>libraries-apache-commons</module>
|
||||
<module>libraries-apache-commons-collections</module>
|
||||
<module>libraries-apache-commons-io</module>
|
||||
<module>libraries-primitive</module>
|
||||
<module>libraries-testing</module>
|
||||
<module>libraries-security</module>
|
||||
|
@ -667,7 +671,6 @@
|
|||
<module>spring-boot</module>
|
||||
<module>spring-boot-admin</module>
|
||||
<module>spring-boot-angular</module>
|
||||
<module>spring-boot-angular-ecommerce</module>
|
||||
<module>spring-boot-autoconfiguration</module>
|
||||
<module>spring-boot-bootstrap</module>
|
||||
<module>spring-boot-camel</module>
|
||||
|
@ -1141,6 +1144,8 @@
|
|||
<module>core-java-modules/core-java-arrays</module>
|
||||
<module>core-java-modules/core-java-arrays-2</module>
|
||||
<module>core-java-modules/core-java-collections</module>
|
||||
<module>core-java-modules/core-java-collections-2</module>
|
||||
<module>core-java-modules/core-java-collections-3</module>
|
||||
<module>core-java-modules/core-java-collections-list</module>
|
||||
<module>core-java-modules/core-java-collections-list-2</module>
|
||||
<module>core-java-modules/core-java-collections-list-3</module>
|
||||
|
@ -1262,6 +1267,8 @@
|
|||
<module>libraries-data</module>
|
||||
<module>libraries-data-2</module>
|
||||
<module>libraries-apache-commons</module>
|
||||
<module>libraries-apache-commons-collections</module>
|
||||
<module>libraries-apache-commons-io</module>
|
||||
<module>libraries-testing</module>
|
||||
<module>libraries-security</module>
|
||||
<module>libraries-server</module>
|
||||
|
@ -1381,7 +1388,6 @@
|
|||
<module>spring-boot</module>
|
||||
<module>spring-boot-admin</module>
|
||||
<module>spring-boot-angular</module>
|
||||
<module>spring-boot-angular-ecommerce</module>
|
||||
<module>spring-boot-autoconfiguration</module>
|
||||
<module>spring-boot-bootstrap</module>
|
||||
<module>spring-boot-camel</module>
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
## SAAS
|
||||
|
||||
This module contains articles about software as a service (SAAS)
|
||||
|
||||
## Relevant articles:
|
||||
|
||||
- [JIRA REST API Integration](http://www.baeldung.com/jira-rest-api)
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
=========
|
||||
## Spark Java
|
||||
|
||||
## Spark Java Framework Tutorial Sample Project
|
||||
This module contains articles about Spark
|
||||
|
||||
### Relevant Articles
|
||||
- [Building an API With the Spark Java Framework](http://www.baeldung.com/spark-framework-rest-api)
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
## Spring 4
|
||||
|
||||
This module contains articles about Spring 4
|
||||
|
||||
### Relevant Articles:
|
||||
- [A Guide to Flips for Spring](http://www.baeldung.com/flips-spring)
|
||||
- [Configuring a Hikari Connection Pool with Spring Boot](https://www.baeldung.com/spring-boot-hikari)
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue