Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removed @Deprecated code in RegexQuantifier #18

Merged
merged 1 commit into from
Mar 30, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
83 changes: 0 additions & 83 deletions src/main/kotlin/RegexQuantifier.kt
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,6 @@ sealed class RegexQuantifier(

interface Greedy {
val butAsFewAsPossible: RegexQuantifier

@Deprecated(
message = "Replace with butAsFewAsPossible",
replaceWith = ReplaceWith(
"butAsFewAsPossible",
"uk.co.mainwave.regextoolboxkotlin.RegexQuantifier"
)
)
fun butAsFewAsPossible() = butAsFewAsPossible
}

/**
Expand Down Expand Up @@ -95,78 +86,4 @@ sealed class RegexQuantifier(
private class LazyAtLeast(minimum: Int) : RegexQuantifier("AtLeast($minimum).butAsFewAsPossible", "{$minimum,}?")
private class LazyNoMoreThan(maximum: Int) : RegexQuantifier("NoMoreThan($maximum).butAsFewAsPossible", "{0,$maximum}?")
private class LazyBetween(minimum: Int, maximum: Int) : RegexQuantifier("Between($minimum, $maximum).butAsFewAsPossible", "{$minimum,$maximum}?")

companion object {
@Deprecated(
message = "Replace with ZeroOrOne",
replaceWith = ReplaceWith(
"ZeroOrOne",
"uk.co.mainwave.regextoolboxkotlin.RegexQuantifier.ZeroOrOne"
)
)
fun oneOrNone() = ZeroOrOne

@Deprecated(
message = "Replace with ZeroOrOne",
replaceWith = ReplaceWith(
"ZeroOrOne",
"uk.co.mainwave.regextoolboxkotlin.RegexQuantifier.ZeroOrOne"
)
)
fun zeroOrOne() = ZeroOrOne

@Deprecated(
message = "Replace with ZeroOrMore",
replaceWith = ReplaceWith(
"ZeroOrMore",
"uk.co.mainwave.regextoolboxkotlin.RegexQuantifier.ZeroOrMore"
)
)
fun zeroOrMore() = ZeroOrMore

@Deprecated(
message = "Replace with OneOrMore",
replaceWith = ReplaceWith(
"OneOrMore",
"uk.co.mainwave.regextoolboxkotlin.RegexQuantifier.OneOrMore"
)
)
fun oneOrMore() = OneOrMore

@Deprecated(
message = "Replace with Exactly",
replaceWith = ReplaceWith(
"Exactly(times)",
"uk.co.mainwave.regextoolboxkotlin.RegexQuantifier.Exactly"
)
)
fun exactly(times: Int) = Exactly(times)

@Deprecated(
message = "Replace with AtLeast",
replaceWith = ReplaceWith(
"AtLeast(minimum)",
"uk.co.mainwave.regextoolboxkotlin.RegexQuantifier.AtLeast"
)
)
fun atLeast(minimum: Int) = AtLeast(minimum)

@Deprecated(
message = "Replace with NoMoreThan",
replaceWith = ReplaceWith(
"NoMoreThan(maximum)",
"uk.co.mainwave.regextoolboxkotlin.RegexQuantifier.NoMoreThan"
)
)
fun noMoreThan(maximum: Int) = NoMoreThan(maximum)

@Deprecated(
message = "Replace with Between",
replaceWith = ReplaceWith(
"Between(minimum, maximum)",
"uk.co.mainwave.regextoolboxkotlin.RegexQuantifier.Between"
)
)
fun between(minimum: Int, maximum: Int) = Between(minimum, maximum)
}
}