Enum warnings fixed: deprecated delimiters, short super constructors, both in project and in libraries
This commit is contained in:
@@ -6,9 +6,9 @@ import java.util.NoSuchElementException
|
||||
import java.lang.UnsupportedOperationException
|
||||
|
||||
private enum class State {
|
||||
Ready
|
||||
NotReady
|
||||
Done
|
||||
Ready,
|
||||
NotReady,
|
||||
Done,
|
||||
Failed
|
||||
}
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ import java.util.Stack
|
||||
*/
|
||||
public enum class FileWalkDirection {
|
||||
/** Depth-first search, directory is visited BEFORE its files */
|
||||
TOP_DOWN
|
||||
TOP_DOWN,
|
||||
/** Depth-first search, directory is visited AFTER its files */
|
||||
BOTTOM_UP
|
||||
// Do we want also breadth-first search?
|
||||
|
||||
@@ -235,7 +235,7 @@ public fun File.copyTo(dst: File, overwrite: Boolean = false, bufferSize: Int =
|
||||
*/
|
||||
public enum class OnErrorAction {
|
||||
/** Skip this file and go to the next. */
|
||||
SKIP
|
||||
SKIP,
|
||||
|
||||
/** Terminate the evaluation of the function. */
|
||||
TERMINATE
|
||||
|
||||
@@ -9,152 +9,152 @@ public enum class CharCategory(public val value: Int, public val code: String) {
|
||||
/**
|
||||
* General category "Cn" in the Unicode specification.
|
||||
*/
|
||||
UNASSIGNED: CharCategory(Character.UNASSIGNED.toInt(), "Cn")
|
||||
UNASSIGNED(Character.UNASSIGNED.toInt(), "Cn"),
|
||||
|
||||
/**
|
||||
* General category "Lu" in the Unicode specification.
|
||||
*/
|
||||
UPPERCASE_LETTER: CharCategory(Character.UPPERCASE_LETTER.toInt(), "Lu")
|
||||
UPPERCASE_LETTER(Character.UPPERCASE_LETTER.toInt(), "Lu"),
|
||||
|
||||
/**
|
||||
* General category "Ll" in the Unicode specification.
|
||||
*/
|
||||
LOWERCASE_LETTER: CharCategory(Character.LOWERCASE_LETTER.toInt(), "Ll")
|
||||
LOWERCASE_LETTER(Character.LOWERCASE_LETTER.toInt(), "Ll"),
|
||||
|
||||
/**
|
||||
* General category "Lt" in the Unicode specification.
|
||||
*/
|
||||
TITLECASE_LETTER: CharCategory(Character.TITLECASE_LETTER.toInt(), "Lt")
|
||||
TITLECASE_LETTER(Character.TITLECASE_LETTER.toInt(), "Lt"),
|
||||
|
||||
/**
|
||||
* General category "Lm" in the Unicode specification.
|
||||
*/
|
||||
MODIFIER_LETTER: CharCategory(Character.MODIFIER_LETTER.toInt(), "Lm")
|
||||
MODIFIER_LETTER(Character.MODIFIER_LETTER.toInt(), "Lm"),
|
||||
|
||||
/**
|
||||
* General category "Lo" in the Unicode specification.
|
||||
*/
|
||||
OTHER_LETTER: CharCategory(Character.OTHER_LETTER.toInt(), "Lo")
|
||||
OTHER_LETTER(Character.OTHER_LETTER.toInt(), "Lo"),
|
||||
|
||||
/**
|
||||
* General category "Mn" in the Unicode specification.
|
||||
*/
|
||||
NON_SPACING_MARK: CharCategory(Character.NON_SPACING_MARK.toInt(), "Mn")
|
||||
NON_SPACING_MARK(Character.NON_SPACING_MARK.toInt(), "Mn"),
|
||||
|
||||
/**
|
||||
* General category "Me" in the Unicode specification.
|
||||
*/
|
||||
ENCLOSING_MARK: CharCategory(Character.ENCLOSING_MARK.toInt(), "Me")
|
||||
ENCLOSING_MARK(Character.ENCLOSING_MARK.toInt(), "Me"),
|
||||
|
||||
/**
|
||||
* General category "Mc" in the Unicode specification.
|
||||
*/
|
||||
COMBINING_SPACING_MARK: CharCategory(Character.COMBINING_SPACING_MARK.toInt(), "Mc")
|
||||
COMBINING_SPACING_MARK(Character.COMBINING_SPACING_MARK.toInt(), "Mc"),
|
||||
|
||||
/**
|
||||
* General category "Nd" in the Unicode specification.
|
||||
*/
|
||||
DECIMAL_DIGIT_NUMBER: CharCategory(Character.DECIMAL_DIGIT_NUMBER.toInt(), "Nd")
|
||||
DECIMAL_DIGIT_NUMBER(Character.DECIMAL_DIGIT_NUMBER.toInt(), "Nd"),
|
||||
|
||||
/**
|
||||
* General category "Nl" in the Unicode specification.
|
||||
*/
|
||||
LETTER_NUMBER: CharCategory(Character.LETTER_NUMBER.toInt(), "Nl")
|
||||
LETTER_NUMBER(Character.LETTER_NUMBER.toInt(), "Nl"),
|
||||
|
||||
/**
|
||||
* General category "No" in the Unicode specification.
|
||||
*/
|
||||
OTHER_NUMBER: CharCategory(Character.OTHER_NUMBER.toInt(), "No")
|
||||
OTHER_NUMBER(Character.OTHER_NUMBER.toInt(), "No"),
|
||||
|
||||
/**
|
||||
* General category "Zs" in the Unicode specification.
|
||||
*/
|
||||
SPACE_SEPARATOR: CharCategory(Character.SPACE_SEPARATOR.toInt(), "Zs")
|
||||
SPACE_SEPARATOR(Character.SPACE_SEPARATOR.toInt(), "Zs"),
|
||||
|
||||
/**
|
||||
* General category "Zl" in the Unicode specification.
|
||||
*/
|
||||
LINE_SEPARATOR: CharCategory(Character.LINE_SEPARATOR.toInt(), "Zl")
|
||||
LINE_SEPARATOR(Character.LINE_SEPARATOR.toInt(), "Zl"),
|
||||
|
||||
/**
|
||||
* General category "Zp" in the Unicode specification.
|
||||
*/
|
||||
PARAGRAPH_SEPARATOR: CharCategory(Character.PARAGRAPH_SEPARATOR.toInt(), "Zp")
|
||||
PARAGRAPH_SEPARATOR(Character.PARAGRAPH_SEPARATOR.toInt(), "Zp"),
|
||||
|
||||
/**
|
||||
* General category "Cc" in the Unicode specification.
|
||||
*/
|
||||
CONTROL: CharCategory(Character.CONTROL.toInt(), "Cc")
|
||||
CONTROL(Character.CONTROL.toInt(), "Cc"),
|
||||
|
||||
/**
|
||||
* General category "Cf" in the Unicode specification.
|
||||
*/
|
||||
FORMAT: CharCategory(Character.FORMAT.toInt(), "Cf")
|
||||
FORMAT(Character.FORMAT.toInt(), "Cf"),
|
||||
|
||||
/**
|
||||
* General category "Co" in the Unicode specification.
|
||||
*/
|
||||
PRIVATE_USE: CharCategory(Character.PRIVATE_USE.toInt(), "Co")
|
||||
PRIVATE_USE(Character.PRIVATE_USE.toInt(), "Co"),
|
||||
|
||||
/**
|
||||
* General category "Cs" in the Unicode specification.
|
||||
*/
|
||||
SURROGATE: CharCategory(Character.SURROGATE.toInt(), "Cs")
|
||||
SURROGATE(Character.SURROGATE.toInt(), "Cs"),
|
||||
|
||||
/**
|
||||
* General category "Pd" in the Unicode specification.
|
||||
*/
|
||||
DASH_PUNCTUATION: CharCategory(Character.DASH_PUNCTUATION.toInt(), "Pd")
|
||||
DASH_PUNCTUATION(Character.DASH_PUNCTUATION.toInt(), "Pd"),
|
||||
|
||||
/**
|
||||
* General category "Ps" in the Unicode specification.
|
||||
*/
|
||||
START_PUNCTUATION: CharCategory(Character.START_PUNCTUATION.toInt(), "Ps")
|
||||
START_PUNCTUATION(Character.START_PUNCTUATION.toInt(), "Ps"),
|
||||
|
||||
/**
|
||||
* General category "Pe" in the Unicode specification.
|
||||
*/
|
||||
END_PUNCTUATION: CharCategory(Character.END_PUNCTUATION.toInt(), "Pe")
|
||||
END_PUNCTUATION(Character.END_PUNCTUATION.toInt(), "Pe"),
|
||||
|
||||
/**
|
||||
* General category "Pc" in the Unicode specification.
|
||||
*/
|
||||
CONNECTOR_PUNCTUATION: CharCategory(Character.CONNECTOR_PUNCTUATION.toInt(), "Pc")
|
||||
CONNECTOR_PUNCTUATION(Character.CONNECTOR_PUNCTUATION.toInt(), "Pc"),
|
||||
|
||||
/**
|
||||
* General category "Po" in the Unicode specification.
|
||||
*/
|
||||
OTHER_PUNCTUATION: CharCategory(Character.OTHER_PUNCTUATION.toInt(), "Po")
|
||||
OTHER_PUNCTUATION(Character.OTHER_PUNCTUATION.toInt(), "Po"),
|
||||
|
||||
/**
|
||||
* General category "Sm" in the Unicode specification.
|
||||
*/
|
||||
MATH_SYMBOL: CharCategory(Character.MATH_SYMBOL.toInt(), "Sm")
|
||||
MATH_SYMBOL(Character.MATH_SYMBOL.toInt(), "Sm"),
|
||||
|
||||
/**
|
||||
* General category "Sc" in the Unicode specification.
|
||||
*/
|
||||
CURRENCY_SYMBOL: CharCategory(Character.CURRENCY_SYMBOL.toInt(), "Sc")
|
||||
CURRENCY_SYMBOL(Character.CURRENCY_SYMBOL.toInt(), "Sc"),
|
||||
|
||||
/**
|
||||
* General category "Sk" in the Unicode specification.
|
||||
*/
|
||||
MODIFIER_SYMBOL: CharCategory(Character.MODIFIER_SYMBOL.toInt(), "Sk")
|
||||
MODIFIER_SYMBOL(Character.MODIFIER_SYMBOL.toInt(), "Sk"),
|
||||
|
||||
/**
|
||||
* General category "So" in the Unicode specification.
|
||||
*/
|
||||
OTHER_SYMBOL: CharCategory(Character.OTHER_SYMBOL.toInt(), "So")
|
||||
OTHER_SYMBOL(Character.OTHER_SYMBOL.toInt(), "So"),
|
||||
|
||||
/**
|
||||
* General category "Pi" in the Unicode specification.
|
||||
*/
|
||||
INITIAL_QUOTE_PUNCTUATION: CharCategory(Character.INITIAL_QUOTE_PUNCTUATION.toInt(), "Pi")
|
||||
INITIAL_QUOTE_PUNCTUATION(Character.INITIAL_QUOTE_PUNCTUATION.toInt(), "Pi"),
|
||||
|
||||
/**
|
||||
* General category "Pf" in the Unicode specification.
|
||||
*/
|
||||
FINAL_QUOTE_PUNCTUATION: CharCategory(Character.FINAL_QUOTE_PUNCTUATION.toInt(), "Pf")
|
||||
FINAL_QUOTE_PUNCTUATION(Character.FINAL_QUOTE_PUNCTUATION.toInt(), "Pf");
|
||||
|
||||
|
||||
public companion object {
|
||||
|
||||
@@ -13,102 +13,102 @@ public enum class CharDirectionality(public val value: Int) {
|
||||
* Undefined bidirectional character type. Undefined `char`
|
||||
* values have undefined directionality in the Unicode specification.
|
||||
*/
|
||||
UNDEFINED: CharDirectionality(Character.DIRECTIONALITY_UNDEFINED.toInt())
|
||||
UNDEFINED(Character.DIRECTIONALITY_UNDEFINED.toInt()),
|
||||
|
||||
/**
|
||||
* Strong bidirectional character type "L" in the Unicode specification.
|
||||
*/
|
||||
LEFT_TO_RIGHT: CharDirectionality(Character.DIRECTIONALITY_LEFT_TO_RIGHT.toInt())
|
||||
LEFT_TO_RIGHT(Character.DIRECTIONALITY_LEFT_TO_RIGHT.toInt()),
|
||||
|
||||
/**
|
||||
* Strong bidirectional character type "R" in the Unicode specification.
|
||||
*/
|
||||
RIGHT_TO_LEFT: CharDirectionality(Character.DIRECTIONALITY_RIGHT_TO_LEFT.toInt())
|
||||
RIGHT_TO_LEFT(Character.DIRECTIONALITY_RIGHT_TO_LEFT.toInt()),
|
||||
|
||||
/**
|
||||
* Strong bidirectional character type "AL" in the Unicode specification.
|
||||
*/
|
||||
RIGHT_TO_LEFT_ARABIC: CharDirectionality(Character.DIRECTIONALITY_RIGHT_TO_LEFT_ARABIC.toInt())
|
||||
RIGHT_TO_LEFT_ARABIC(Character.DIRECTIONALITY_RIGHT_TO_LEFT_ARABIC.toInt()),
|
||||
|
||||
/**
|
||||
* Weak bidirectional character type "EN" in the Unicode specification.
|
||||
*/
|
||||
EUROPEAN_NUMBER: CharDirectionality(Character.DIRECTIONALITY_EUROPEAN_NUMBER.toInt())
|
||||
EUROPEAN_NUMBER(Character.DIRECTIONALITY_EUROPEAN_NUMBER.toInt()),
|
||||
|
||||
/**
|
||||
* Weak bidirectional character type "ES" in the Unicode specification.
|
||||
*/
|
||||
EUROPEAN_NUMBER_SEPARATOR: CharDirectionality(Character.DIRECTIONALITY_EUROPEAN_NUMBER_SEPARATOR.toInt())
|
||||
EUROPEAN_NUMBER_SEPARATOR(Character.DIRECTIONALITY_EUROPEAN_NUMBER_SEPARATOR.toInt()),
|
||||
|
||||
/**
|
||||
* Weak bidirectional character type "ET" in the Unicode specification.
|
||||
*/
|
||||
EUROPEAN_NUMBER_TERMINATOR: CharDirectionality(Character.DIRECTIONALITY_EUROPEAN_NUMBER_TERMINATOR.toInt())
|
||||
EUROPEAN_NUMBER_TERMINATOR(Character.DIRECTIONALITY_EUROPEAN_NUMBER_TERMINATOR.toInt()),
|
||||
|
||||
/**
|
||||
* Weak bidirectional character type "AN" in the Unicode specification.
|
||||
*/
|
||||
ARABIC_NUMBER: CharDirectionality(Character.DIRECTIONALITY_ARABIC_NUMBER.toInt())
|
||||
ARABIC_NUMBER(Character.DIRECTIONALITY_ARABIC_NUMBER.toInt()),
|
||||
|
||||
/**
|
||||
* Weak bidirectional character type "CS" in the Unicode specification.
|
||||
*/
|
||||
COMMON_NUMBER_SEPARATOR: CharDirectionality(Character.DIRECTIONALITY_COMMON_NUMBER_SEPARATOR.toInt())
|
||||
COMMON_NUMBER_SEPARATOR(Character.DIRECTIONALITY_COMMON_NUMBER_SEPARATOR.toInt()),
|
||||
|
||||
/**
|
||||
* Weak bidirectional character type "NSM" in the Unicode specification.
|
||||
*/
|
||||
NONSPACING_MARK: CharDirectionality(Character.DIRECTIONALITY_NONSPACING_MARK.toInt())
|
||||
NONSPACING_MARK(Character.DIRECTIONALITY_NONSPACING_MARK.toInt()),
|
||||
|
||||
/**
|
||||
* Weak bidirectional character type "BN" in the Unicode specification.
|
||||
*/
|
||||
BOUNDARY_NEUTRAL: CharDirectionality(Character.DIRECTIONALITY_BOUNDARY_NEUTRAL.toInt())
|
||||
BOUNDARY_NEUTRAL(Character.DIRECTIONALITY_BOUNDARY_NEUTRAL.toInt()),
|
||||
|
||||
/**
|
||||
* Neutral bidirectional character type "B" in the Unicode specification.
|
||||
*/
|
||||
PARAGRAPH_SEPARATOR: CharDirectionality(Character.DIRECTIONALITY_PARAGRAPH_SEPARATOR.toInt())
|
||||
PARAGRAPH_SEPARATOR(Character.DIRECTIONALITY_PARAGRAPH_SEPARATOR.toInt()),
|
||||
|
||||
/**
|
||||
* Neutral bidirectional character type "S" in the Unicode specification.
|
||||
*/
|
||||
SEGMENT_SEPARATOR: CharDirectionality(Character.DIRECTIONALITY_SEGMENT_SEPARATOR.toInt())
|
||||
SEGMENT_SEPARATOR(Character.DIRECTIONALITY_SEGMENT_SEPARATOR.toInt()),
|
||||
|
||||
/**
|
||||
* Neutral bidirectional character type "WS" in the Unicode specification.
|
||||
*/
|
||||
WHITESPACE: CharDirectionality(Character.DIRECTIONALITY_WHITESPACE.toInt())
|
||||
WHITESPACE(Character.DIRECTIONALITY_WHITESPACE.toInt()),
|
||||
|
||||
/**
|
||||
* Neutral bidirectional character type "ON" in the Unicode specification.
|
||||
*/
|
||||
OTHER_NEUTRALS: CharDirectionality(Character.DIRECTIONALITY_OTHER_NEUTRALS.toInt())
|
||||
OTHER_NEUTRALS(Character.DIRECTIONALITY_OTHER_NEUTRALS.toInt()),
|
||||
|
||||
/**
|
||||
* Strong bidirectional character type "LRE" in the Unicode specification.
|
||||
*/
|
||||
LEFT_TO_RIGHT_EMBEDDING: CharDirectionality(Character.DIRECTIONALITY_LEFT_TO_RIGHT_EMBEDDING.toInt())
|
||||
LEFT_TO_RIGHT_EMBEDDING(Character.DIRECTIONALITY_LEFT_TO_RIGHT_EMBEDDING.toInt()),
|
||||
|
||||
/**
|
||||
* Strong bidirectional character type "LRO" in the Unicode specification.
|
||||
*/
|
||||
LEFT_TO_RIGHT_OVERRIDE: CharDirectionality(Character.DIRECTIONALITY_LEFT_TO_RIGHT_OVERRIDE.toInt())
|
||||
LEFT_TO_RIGHT_OVERRIDE(Character.DIRECTIONALITY_LEFT_TO_RIGHT_OVERRIDE.toInt()),
|
||||
|
||||
/**
|
||||
* Strong bidirectional character type "RLE" in the Unicode specification.
|
||||
*/
|
||||
RIGHT_TO_LEFT_EMBEDDING: CharDirectionality(Character.DIRECTIONALITY_RIGHT_TO_LEFT_EMBEDDING.toInt())
|
||||
RIGHT_TO_LEFT_EMBEDDING(Character.DIRECTIONALITY_RIGHT_TO_LEFT_EMBEDDING.toInt()),
|
||||
|
||||
/**
|
||||
* Strong bidirectional character type "RLO" in the Unicode specification.
|
||||
*/
|
||||
RIGHT_TO_LEFT_OVERRIDE: CharDirectionality(Character.DIRECTIONALITY_RIGHT_TO_LEFT_OVERRIDE.toInt())
|
||||
RIGHT_TO_LEFT_OVERRIDE(Character.DIRECTIONALITY_RIGHT_TO_LEFT_OVERRIDE.toInt()),
|
||||
|
||||
/**
|
||||
* Weak bidirectional character type "PDF" in the Unicode specification.
|
||||
*/
|
||||
POP_DIRECTIONAL_FORMAT: CharDirectionality(Character.DIRECTIONALITY_POP_DIRECTIONAL_FORMAT.toInt())
|
||||
POP_DIRECTIONAL_FORMAT(Character.DIRECTIONALITY_POP_DIRECTIONAL_FORMAT.toInt());
|
||||
|
||||
|
||||
public companion object {
|
||||
|
||||
@@ -35,13 +35,13 @@ public enum class RegexOption(override val value: Int, override val mask: Int =
|
||||
// common
|
||||
|
||||
/** Enables case-insensitive matching. Case comparison is Unicode-aware. */
|
||||
IGNORE_CASE : RegexOption(Pattern.CASE_INSENSITIVE)
|
||||
IGNORE_CASE(Pattern.CASE_INSENSITIVE),
|
||||
|
||||
/** Enables multiline mode.
|
||||
*
|
||||
* In multiline mode the expressions `^` and `$` match just after or just before,
|
||||
* respectively, a line terminator or the end of the input sequence. */
|
||||
MULTILINE : RegexOption(Pattern.MULTILINE)
|
||||
MULTILINE(Pattern.MULTILINE),
|
||||
|
||||
//jvm-specific
|
||||
|
||||
@@ -49,27 +49,27 @@ public enum class RegexOption(override val value: Int, override val mask: Int =
|
||||
*
|
||||
* Metacharacters or escape sequences in the input sequence will be given no special meaning.
|
||||
*/
|
||||
LITERAL : RegexOption(Pattern.LITERAL)
|
||||
LITERAL(Pattern.LITERAL),
|
||||
|
||||
// // Unicode case is enabled by default with the IGNORE_CASE
|
||||
// /** Enables Unicode-aware case folding. */
|
||||
// UNICODE_CASE: RegexOption(Pattern.UNICODE_CASE)
|
||||
// UNICODE_CASE(Pattern.UNICODE_CASE)
|
||||
|
||||
/** Enables Unix lines mode.
|
||||
* In this mode, only the `'\n'` is recognized as a line terminator.
|
||||
*/
|
||||
UNIX_LINES: RegexOption(Pattern.UNIX_LINES) // TODO: Remove this
|
||||
UNIX_LINES(Pattern.UNIX_LINES), // TODO: Remove this
|
||||
|
||||
/** Permits whitespace and comments in pattern. */
|
||||
COMMENTS: RegexOption(Pattern.COMMENTS)
|
||||
COMMENTS(Pattern.COMMENTS),
|
||||
|
||||
/** Enables the mode, when the expression `.` matches any character,
|
||||
* including a line terminator.
|
||||
*/
|
||||
DOT_MATCHES_ALL: RegexOption(Pattern.DOTALL)
|
||||
DOT_MATCHES_ALL(Pattern.DOTALL),
|
||||
|
||||
/** Enables equivalence by canonical decomposition. */
|
||||
CANON_EQ: RegexOption(Pattern.CANON_EQ)
|
||||
CANON_EQ(Pattern.CANON_EQ)
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user