Skip to content

Commit

Permalink
🔥 Remove Zero.Companion.PATTERN property (#676)
Browse files Browse the repository at this point in the history
  • Loading branch information
LVMVRQUXL committed Jul 15, 2024
1 parent 1787bca commit 72d39fc
Show file tree
Hide file tree
Showing 5 changed files with 1 addition and 100 deletions.
1 change: 0 additions & 1 deletion subprojects/library/src/api/types.api
Original file line number Diff line number Diff line change
Expand Up @@ -455,7 +455,6 @@ public final class org/kotools/types/EmailAddress$Companion {

public final class org/kotools/types/Zero {
public static final field Companion Lorg/kotools/types/Zero$Companion;
public static final field PATTERN Ljava/lang/String;
public fun <init> ()V
public fun <init> (Ljava/lang/Object;)V
public final fun compareTo (B)I
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -573,51 +573,5 @@ public class Zero {
// -------------------------------------------------------------------------

/** Contains static declarations for the [Zero] type. */
public companion object {
/**
* The pattern a zero number should match.
*
* The underlying value is `^[+-]?0+(?:\.0+)?$`.
*
* Here's the explanation associated to each symbol used in this
* pattern:
* - `^` **Beginning.** Matches the beginning of the string, or the
* beginning of a line if the multiline flag (**m**) is enabled.
* - `[]` **Character set.** Matches any character in the set.
* - `+` **Character.** Matches a "+" character (char code 43).
* - `-` **Character.** Matches a "-" character (char code 45).
* - `?` **Quantifier.** Match between 0 and 1 of the preceding token.
* - `0` **Character.** Matches a "0" character (char code 48).
* - `+` **Quantifier.** Match 1 or more of the preceding token.
* - `(?:)` **Non-capturing group.** Groups multiple tokens together
* without creating a capture group.
* - `\.` **Escaped character.** Matches a "." character (char code 46).
* - `$` **End.** Matches the end of the string, or the end of a line if
* the multiline flag (**m**) is enabled.
*
* <br>
* <details open>
* <summary>
* <b>Calling from Kotlin</b>
* </summary>
*
* Here's an example of calling this property from Kotlin code:
*
* SAMPLE: [org.kotools.types.ZeroCompanionCommonSample.pattern]
* </details>
*
* <br>
* <details>
* <summary>
* <b>Calling from Java</b>
* </summary>
*
* Here's an example of calling this property from Java code:
*
* SAMPLE: [org.kotools.types.ZeroCompanionJavaSample.pattern]
* </details>
*/
@ExperimentalSince(KotoolsTypesVersion.Unreleased)
public const val PATTERN: String = """^[+-]?0+(?:\.0+)?$"""
}
public companion object
}

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -298,13 +298,3 @@ class ZeroTest {
assertEquals(expected, actual)
}
}

@OptIn(ExperimentalKotoolsTypesApi::class)
class ZeroCompanionTest {
@Test
fun patternShouldPass() {
val actual: String = Zero.PATTERN
val expected = """^[+-]?0+(?:\.0+)?$"""
assertEquals(expected, actual)
}
}

This file was deleted.

0 comments on commit 72d39fc

Please sign in to comment.