Split or move core-java-modules/core-java-arrays module (#7784)
This commit is contained in:
parent
f2cac1ab7c
commit
87e98c9085
25
core-java-modules/core-java-arrays-2/.gitignore
vendored
25
core-java-modules/core-java-arrays-2/.gitignore
vendored
@ -1,25 +0,0 @@
|
|||||||
*.class
|
|
||||||
|
|
||||||
0.*
|
|
||||||
|
|
||||||
#folders#
|
|
||||||
/target
|
|
||||||
/neoDb*
|
|
||||||
/data
|
|
||||||
/src/main/webapp/WEB-INF/classes
|
|
||||||
*/META-INF/*
|
|
||||||
.resourceCache
|
|
||||||
|
|
||||||
# Packaged files #
|
|
||||||
*.jar
|
|
||||||
*.war
|
|
||||||
*.ear
|
|
||||||
|
|
||||||
# Files generated by integration tests
|
|
||||||
backup-pom.xml
|
|
||||||
/bin/
|
|
||||||
/temp
|
|
||||||
|
|
||||||
#IntelliJ specific
|
|
||||||
.idea/
|
|
||||||
*.iml
|
|
@ -1,5 +1,9 @@
|
|||||||
## 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)
|
||||||
- [Checking If an Array Is Sorted in Java](https://www.baeldung.com/java-check-sorted-array)
|
|
||||||
- [Looping Diagonally Through a 2d Java Array](https://www.baeldung.com/java-loop-diagonal-array)
|
- [Looping Diagonally Through a 2d Java Array](https://www.baeldung.com/java-loop-diagonal-array)
|
||||||
|
- [Converting Between Stream and Array in Java](https://www.baeldung.com/java-stream-to-array)
|
||||||
|
- [Convert a Float to a Byte Array in Java](https://www.baeldung.com/java-convert-float-to-byte-array)
|
||||||
|
- [Array Operations in Java](https://www.baeldung.com/java-common-array-operations)
|
||||||
|
- [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)
|
||||||
|
@ -1,19 +1,14 @@
|
|||||||
package com.baeldung.array.operations;
|
package com.baeldung.array.operations;
|
||||||
|
|
||||||
|
import org.apache.commons.lang3.ArrayUtils;
|
||||||
|
|
||||||
import java.lang.reflect.Array;
|
import java.lang.reflect.Array;
|
||||||
import java.util.Arrays;
|
import java.util.*;
|
||||||
import java.util.HashSet;
|
|
||||||
import java.util.LinkedHashSet;
|
|
||||||
import java.util.LinkedList;
|
|
||||||
import java.util.Random;
|
|
||||||
import java.util.Set;
|
|
||||||
import java.util.function.Function;
|
import java.util.function.Function;
|
||||||
import java.util.function.IntPredicate;
|
import java.util.function.IntPredicate;
|
||||||
import java.util.function.Predicate;
|
import java.util.function.Predicate;
|
||||||
import java.util.stream.Stream;
|
import java.util.stream.Stream;
|
||||||
|
|
||||||
import org.apache.commons.lang3.ArrayUtils;
|
|
||||||
|
|
||||||
public class ArrayOperations {
|
public class ArrayOperations {
|
||||||
|
|
||||||
// Get the first and last item of an array
|
// Get the first and last item of an array
|
@ -1,13 +1,10 @@
|
|||||||
package com.baeldung.array;
|
package com.baeldung.array;
|
||||||
|
|
||||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
|
||||||
import static org.junit.jupiter.api.Assertions.assertFalse;
|
|
||||||
import static org.junit.jupiter.api.Assertions.assertThrows;
|
|
||||||
import static org.junit.jupiter.api.Assertions.assertTrue;
|
|
||||||
|
|
||||||
import org.apache.commons.lang3.ArrayUtils;
|
import org.apache.commons.lang3.ArrayUtils;
|
||||||
import org.junit.jupiter.api.Test;
|
import org.junit.jupiter.api.Test;
|
||||||
|
|
||||||
|
import static org.junit.jupiter.api.Assertions.*;
|
||||||
|
|
||||||
class RemoveElementFromAnArrayUnitTest {
|
class RemoveElementFromAnArrayUnitTest {
|
||||||
|
|
||||||
private final RemoveElementFromAnArray sut = new RemoveElementFromAnArray();
|
private final RemoveElementFromAnArray sut = new RemoveElementFromAnArray();
|
@ -1,12 +1,10 @@
|
|||||||
package com.baeldung.array.conversions;
|
package com.baeldung.array.conversions;
|
||||||
|
|
||||||
import static com.baeldung.array.conversions.FloatToByteArray.byteArrayToFloat;
|
import org.junit.Test;
|
||||||
import static com.baeldung.array.conversions.FloatToByteArray.byteArrayToFloatWithByteBuffer;
|
|
||||||
import static com.baeldung.array.conversions.FloatToByteArray.floatToByteArray;
|
import static com.baeldung.array.conversions.FloatToByteArray.*;
|
||||||
import static com.baeldung.array.conversions.FloatToByteArray.floatToByteArrayWithByteBuffer;
|
|
||||||
import static org.junit.Assert.assertArrayEquals;
|
import static org.junit.Assert.assertArrayEquals;
|
||||||
import static org.junit.Assert.assertEquals;
|
import static org.junit.Assert.assertEquals;
|
||||||
import org.junit.Test;
|
|
||||||
|
|
||||||
public class FloatToByteArrayUnitTest {
|
public class FloatToByteArrayUnitTest {
|
||||||
|
|
@ -1,13 +1,13 @@
|
|||||||
package com.baeldung.array.operations;
|
package com.baeldung.array.operations;
|
||||||
|
|
||||||
import static org.assertj.core.api.Assertions.assertThat;
|
|
||||||
|
|
||||||
import java.util.Arrays;
|
|
||||||
|
|
||||||
import org.assertj.core.api.Condition;
|
import org.assertj.core.api.Condition;
|
||||||
import org.junit.jupiter.api.BeforeEach;
|
import org.junit.jupiter.api.BeforeEach;
|
||||||
import org.junit.jupiter.api.Test;
|
import org.junit.jupiter.api.Test;
|
||||||
|
|
||||||
|
import java.util.Arrays;
|
||||||
|
|
||||||
|
import static org.assertj.core.api.Assertions.assertThat;
|
||||||
|
|
||||||
public class ArrayOperationsUnitTest {
|
public class ArrayOperationsUnitTest {
|
||||||
|
|
||||||
private Integer[] defaultObjectArray;
|
private Integer[] defaultObjectArray;
|
@ -2,9 +2,7 @@ package com.baeldung.array.operations;
|
|||||||
|
|
||||||
import org.junit.jupiter.api.Test;
|
import org.junit.jupiter.api.Test;
|
||||||
|
|
||||||
import static com.baeldung.array.operations.ArrayOperations.intersectionMultiSet;
|
import static com.baeldung.array.operations.ArrayOperations.*;
|
||||||
import static com.baeldung.array.operations.ArrayOperations.intersectionSet;
|
|
||||||
import static com.baeldung.array.operations.ArrayOperations.intersectionSimple;
|
|
||||||
import static org.assertj.core.api.Assertions.assertThat;
|
import static org.assertj.core.api.Assertions.assertThat;
|
||||||
|
|
||||||
class IntersectionUnitTest {
|
class IntersectionUnitTest {
|
25
core-java-modules/core-java-arrays/.gitignore
vendored
25
core-java-modules/core-java-arrays/.gitignore
vendored
@ -1,25 +0,0 @@
|
|||||||
*.class
|
|
||||||
|
|
||||||
0.*
|
|
||||||
|
|
||||||
#folders#
|
|
||||||
/target
|
|
||||||
/neoDb*
|
|
||||||
/data
|
|
||||||
/src/main/webapp/WEB-INF/classes
|
|
||||||
*/META-INF/*
|
|
||||||
.resourceCache
|
|
||||||
|
|
||||||
# Packaged files #
|
|
||||||
*.jar
|
|
||||||
*.war
|
|
||||||
*.ear
|
|
||||||
|
|
||||||
# Files generated by integration tests
|
|
||||||
backup-pom.xml
|
|
||||||
/bin/
|
|
||||||
/temp
|
|
||||||
|
|
||||||
#IntelliJ specific
|
|
||||||
.idea/
|
|
||||||
*.iml
|
|
@ -3,17 +3,13 @@
|
|||||||
## Core Java Arrays Cookbooks and Examples
|
## Core Java Arrays Cookbooks and Examples
|
||||||
|
|
||||||
### Relevant Articles:
|
### Relevant Articles:
|
||||||
- [How to Copy an Array in Java](http://www.baeldung.com/java-array-copy)
|
- [How to Copy an Array in Java](https://www.baeldung.com/java-array-copy)
|
||||||
- [Check if a Java Array Contains a Value](http://www.baeldung.com/java-array-contains-value)
|
- [Check if a Java Array Contains a Value](https://www.baeldung.com/java-array-contains-value)
|
||||||
- [Initializing Arrays in Java](http://www.baeldung.com/java-initialize-array)
|
- [Initializing Arrays in Java](https://www.baeldung.com/java-initialize-array)
|
||||||
- [Guide to the java.util.Arrays Class](http://www.baeldung.com/java-util-arrays)
|
- [Guide to the java.util.Arrays Class](https://www.baeldung.com/java-util-arrays)
|
||||||
- [Multi-Dimensional Arrays In Java](http://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](http://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](http://www.baeldung.com/java-invert-array)
|
- [How to Invert an Array in Java](https://www.baeldung.com/java-invert-array)
|
||||||
- [Array Operations in Java](http://www.baeldung.com/java-common-array-operations)
|
|
||||||
- [Intersection Between two Integer Arrays](https://www.baeldung.com/java-array-intersection)
|
|
||||||
- [Sorting Arrays in Java](https://www.baeldung.com/java-sorting-arrays)
|
- [Sorting Arrays in Java](https://www.baeldung.com/java-sorting-arrays)
|
||||||
- [Convert a Float to a Byte Array in Java](https://www.baeldung.com/java-convert-float-to-byte-array)
|
- [Checking If an Array Is Sorted in Java](https://www.baeldung.com/java-check-sorted-array)
|
||||||
- [Converting Between Stream and Array in Java](https://www.baeldung.com/java-stream-to-array)
|
|
||||||
- [Removing an Element from an Array in Java](https://www.baeldung.com/java-array-remove-element)
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user