Merge pull request #8387 from catalin-burcea/BAEL-19883
[BAEL-19883] - Move articles out of core-kotlin part2
This commit is contained in:
@@ -4,9 +4,6 @@ This module contains articles about core Kotlin.
|
|||||||
|
|
||||||
### Relevant articles:
|
### Relevant articles:
|
||||||
|
|
||||||
- [Void Type in Kotlin](https://www.baeldung.com/kotlin-void-type)
|
|
||||||
- [How to use Kotlin Range Expressions](https://www.baeldung.com/kotlin-ranges)
|
|
||||||
- [Creating a Kotlin Range Iterator on a Custom Object](https://www.baeldung.com/kotlin-custom-range-iterator)
|
|
||||||
- [Kotlin Scope Functions](https://www.baeldung.com/kotlin-scope-functions)
|
- [Kotlin Scope Functions](https://www.baeldung.com/kotlin-scope-functions)
|
||||||
- [Kotlin Annotations](https://www.baeldung.com/kotlin-annotations)
|
- [Kotlin Annotations](https://www.baeldung.com/kotlin-annotations)
|
||||||
- [Split a List into Parts in Kotlin](https://www.baeldung.com/kotlin-split-list-into-parts)
|
- [Split a List into Parts in Kotlin](https://www.baeldung.com/kotlin-split-list-into-parts)
|
||||||
|
|||||||
@@ -0,0 +1,13 @@
|
|||||||
|
## Core Kotlin Lang
|
||||||
|
|
||||||
|
This module contains articles about core features in the Kotlin language.
|
||||||
|
|
||||||
|
### Relevant articles:
|
||||||
|
- [Kotlin return, break, continue Keywords](https://www.baeldung.com/kotlin-return-break-continue)
|
||||||
|
- [Infix Functions in Kotlin](https://www.baeldung.com/kotlin-infix-functions)
|
||||||
|
- [Lambda Expressions in Kotlin](https://www.baeldung.com/kotlin-lambda-expressions)
|
||||||
|
- [Creating Java static final Equivalents in Kotlin](https://www.baeldung.com/kotlin-java-static-final)
|
||||||
|
- [Initializing Arrays in Kotlin](https://www.baeldung.com/kotlin-initialize-array)
|
||||||
|
- [Lazy Initialization in Kotlin](https://www.baeldung.com/kotlin-lazy-initialization)
|
||||||
|
- [Comprehensive Guide to Null Safety in Kotlin](https://www.baeldung.com/kotlin-null-safety)
|
||||||
|
- [[<-- Prev]](/core-kotlin-modules/core-kotlin-lang)
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
<?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>core-kotlin-lang-2</artifactId>
|
||||||
|
<name>core-kotlin-lang-2</name>
|
||||||
|
<packaging>jar</packaging>
|
||||||
|
|
||||||
|
<parent>
|
||||||
|
<groupId>com.baeldung.core-kotlin-modules</groupId>
|
||||||
|
<artifactId>core-kotlin-modules</artifactId>
|
||||||
|
<version>1.0.0-SNAPSHOT</version>
|
||||||
|
</parent>
|
||||||
|
|
||||||
|
</project>
|
||||||
+1
-3
@@ -1,7 +1,5 @@
|
|||||||
package com.baeldung.kotlin;
|
package com.baeldung.lazy;
|
||||||
|
|
||||||
|
|
||||||
import com.baeldung.lazy.ClassWithHeavyInitialization;
|
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
|
||||||
import static junit.framework.TestCase.assertTrue;
|
import static junit.framework.TestCase.assertTrue;
|
||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
package com.baeldung.kotlin
|
package com.baeldung.arrayinitialization
|
||||||
|
|
||||||
import org.junit.Test
|
import org.junit.Test
|
||||||
import kotlin.test.assertEquals
|
import kotlin.test.assertEquals
|
||||||
+2
-2
@@ -1,5 +1,5 @@
|
|||||||
import com.baeldung.kotlin.constant.TestKotlinConstantClass
|
package com.baeldung.constant
|
||||||
import com.baeldung.kotlin.constant.TestKotlinConstantObject
|
|
||||||
import org.junit.jupiter.api.Test
|
import org.junit.jupiter.api.Test
|
||||||
import kotlin.test.assertEquals
|
import kotlin.test.assertEquals
|
||||||
|
|
||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
package com.baeldung.kotlin.constant
|
package com.baeldung.constant
|
||||||
|
|
||||||
|
|
||||||
class TestKotlinConstantClass {
|
class TestKotlinConstantClass {
|
||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
package com.baeldung.kotlin.constant
|
package com.baeldung.constant
|
||||||
|
|
||||||
|
|
||||||
object TestKotlinConstantObject {
|
object TestKotlinConstantObject {
|
||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
package com.baeldung.kotlin
|
package com.baeldung.infixfunctions
|
||||||
|
|
||||||
import org.junit.Assert
|
import org.junit.Assert
|
||||||
import org.junit.Test
|
import org.junit.Test
|
||||||
+1
@@ -6,6 +6,7 @@ import org.junit.jupiter.api.Test
|
|||||||
import kotlin.test.assertEquals
|
import kotlin.test.assertEquals
|
||||||
|
|
||||||
class LambdaTest {
|
class LambdaTest {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun whenCallingALambda_thenPerformTheAction() {
|
fun whenCallingALambda_thenPerformTheAction() {
|
||||||
assertEquals(9, inferredType(3))
|
assertEquals(9, inferredType(3))
|
||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
package com.baeldung.kotlin
|
package com.baeldung.lazy
|
||||||
|
|
||||||
import org.junit.Test
|
import org.junit.Test
|
||||||
import java.util.concurrent.CountDownLatch
|
import java.util.concurrent.CountDownLatch
|
||||||
+2
-1
@@ -1,4 +1,4 @@
|
|||||||
package com.baeldung.kotlin
|
package com.baeldung.nullsafety
|
||||||
|
|
||||||
import org.junit.Test
|
import org.junit.Test
|
||||||
import kotlin.test.assertEquals
|
import kotlin.test.assertEquals
|
||||||
@@ -8,6 +8,7 @@ import kotlin.test.assertTrue
|
|||||||
|
|
||||||
|
|
||||||
class NullSafetyTest {
|
class NullSafetyTest {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun givenNonNullableField_whenAssignValueToIt_thenNotNeedToCheckAgainstNull() {
|
fun givenNonNullableField_whenAssignValueToIt_thenNotNeedToCheckAgainstNull() {
|
||||||
//given
|
//given
|
||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
package com.baeldung.kotlin
|
package com.baeldung.structuraljump
|
||||||
|
|
||||||
import org.junit.Test
|
import org.junit.Test
|
||||||
import kotlin.test.assertEquals
|
import kotlin.test.assertEquals
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
## Core Kotlin Lang
|
||||||
|
|
||||||
|
This module contains articles about core features in the Kotlin language.
|
||||||
|
|
||||||
|
### Relevant articles:
|
||||||
|
- [Guide to the “when{}” Block in Kotlin](https://www.baeldung.com/kotlin-when)
|
||||||
|
- [Difference Between “==” and “===” Operators in Kotlin](https://www.baeldung.com/kotlin-equality-operators)
|
||||||
|
- [Nested forEach in Kotlin](https://www.baeldung.com/kotlin-nested-foreach)
|
||||||
|
- [Destructuring Declarations in Kotlin](https://www.baeldung.com/kotlin-destructuring-declarations)
|
||||||
|
- [Try-with-resources in Kotlin](https://www.baeldung.com/kotlin-try-with-resources)
|
||||||
|
- [Operator Overloading in Kotlin](https://www.baeldung.com/kotlin-operator-overloading)
|
||||||
|
- [Inline Functions in Kotlin](https://www.baeldung.com/kotlin-inline-functions)
|
||||||
|
- [Void Type in Kotlin](https://www.baeldung.com/kotlin-void-type)
|
||||||
|
- [How to use Kotlin Range Expressions](https://www.baeldung.com/kotlin-ranges)
|
||||||
|
- [Creating a Kotlin Range Iterator on a Custom Object](https://www.baeldung.com/kotlin-custom-range-iterator)
|
||||||
|
- [[More --> ]](/core-kotlin-modules/core-kotlin-lang-2)
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
<?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>core-kotlin-lang</artifactId>
|
||||||
|
<name>core-kotlin-lang</name>
|
||||||
|
<packaging>jar</packaging>
|
||||||
|
|
||||||
|
<parent>
|
||||||
|
<groupId>com.baeldung.core-kotlin-modules</groupId>
|
||||||
|
<artifactId>core-kotlin-modules</artifactId>
|
||||||
|
<version>1.0.0-SNAPSHOT</version>
|
||||||
|
</parent>
|
||||||
|
|
||||||
|
</project>
|
||||||
-2
@@ -1,7 +1,5 @@
|
|||||||
package com.baeldung.destructuringdeclarations
|
package com.baeldung.destructuringdeclarations
|
||||||
|
|
||||||
import com.baeldung.destructuringdeclarations.Person
|
|
||||||
|
|
||||||
fun main(args: Array<String>) {
|
fun main(args: Array<String>) {
|
||||||
|
|
||||||
//2.1. Objects
|
//2.1. Objects
|
||||||
+1
-1
@@ -1,3 +1,3 @@
|
|||||||
package com.baeldung.kotlin
|
package com.baeldung.equalityoperators
|
||||||
|
|
||||||
data class User(val name: String, val age: Int, val hobbies: List<String>)
|
data class User(val name: String, val age: Int, val hobbies: List<String>)
|
||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
package com.baeldung.functions
|
package com.baeldung.inline
|
||||||
|
|
||||||
import kotlin.random.Random
|
import kotlin.random.Random
|
||||||
|
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user