@@ -8,52 +8,51 @@ import scala.math.Ordering
88final class CodePoint private (val intValue : Int ) {
99 require(Character .isValidCodePoint(intValue), s " $intValue is not a valid codepoint " )
1010
11- override def toString : String = new String (Array [Int ](intValue), 0 , 1 )
12- override def hashCode : Int = intValue
13- override def equals (other: Any ): Boolean = other match {
14- case other2: CodePoint => this .intValue == other2.intValue
15- case _ => false
11+ override def toString : String = new String (Array [Int ](intValue), 0 , 1 )
12+ override def hashCode : Int = intValue
13+
14+ override def equals (other: Any ): Boolean = other match {
15+ case other2: CodePoint => this .intValue == other2.intValue
16+ case _ => false
1617 }
1718
18- def charCount : Int = Character .charCount(intValue)
19- def name : String = Character .getName(intValue)
20-
21- def isAlphabetic : Boolean = Character .isAlphabetic(intValue)
22- def isBmp : Boolean = Character .isBmpCodePoint(intValue)
23- def isDefined : Boolean = Character .isDefined(intValue)
24- def isDigit : Boolean = Character .isDigit(intValue)
25- def isIdentifierIgnorable : Boolean = Character .isIdentifierIgnorable(intValue)
26- def isIdeographic : Boolean = Character .isIdeographic(intValue)
27- def isISOControl : Boolean = Character .isISOControl(intValue)
28- def isJavaIdentifierPart : Boolean = Character .isJavaIdentifierPart(intValue)
29- def isJavaIdentifierStart : Boolean = Character .isJavaIdentifierStart(intValue)
30- def isLetter : Boolean = Character .isLetter(intValue)
31- def isLetterOrDigit : Boolean = Character .isLetterOrDigit(intValue)
32- def isLowerCase : Boolean = Character .isLowerCase(intValue)
33- def isMirrored : Boolean = Character .isMirrored(intValue)
34- def isSpaceChar : Boolean = Character .isSpaceChar(intValue)
35- def isSupplementary : Boolean = Character .isSupplementaryCodePoint(intValue)
36- def isTitleCase : Boolean = Character .isTitleCase(intValue)
37- def isUnicodeIdentifierPart : Boolean = Character .isUnicodeIdentifierPart(intValue)
38- def isUnicodeIdentifierStart : Boolean = Character .isUnicodeIdentifierStart(intValue)
39- def isUpperCase : Boolean = Character .isUpperCase(intValue)
40- def isWhitespace : Boolean = Character .isWhitespace(intValue)
41-
42- def toLowerCase : CodePoint = new CodePoint (Character .toLowerCase(intValue))
43- def toTitleCase : CodePoint = new CodePoint (Character .toTitleCase(intValue))
44- def toUpperCase : CodePoint = new CodePoint (Character .toUpperCase(intValue))
19+ def charCount : Int = Character .charCount(intValue)
20+ def name : String = Character .getName(intValue)
21+ def isAlphabetic : Boolean = Character .isAlphabetic(intValue)
22+ def isBmp : Boolean = Character .isBmpCodePoint(intValue)
23+ def isDefined : Boolean = Character .isDefined(intValue)
24+ def isDigit : Boolean = Character .isDigit(intValue)
25+ def isIdentifierIgnorable : Boolean = Character .isIdentifierIgnorable(intValue)
26+ def isIdeographic : Boolean = Character .isIdeographic(intValue)
27+ def isISOControl : Boolean = Character .isISOControl(intValue)
28+ def isJavaIdentifierPart : Boolean = Character .isJavaIdentifierPart(intValue)
29+ def isJavaIdentifierStart : Boolean = Character .isJavaIdentifierStart(intValue)
30+ def isLetter : Boolean = Character .isLetter(intValue)
31+ def isLetterOrDigit : Boolean = Character .isLetterOrDigit(intValue)
32+ def isLowerCase : Boolean = Character .isLowerCase(intValue)
33+ def isMirrored : Boolean = Character .isMirrored(intValue)
34+ def isSpaceChar : Boolean = Character .isSpaceChar(intValue)
35+ def isSupplementary : Boolean = Character .isSupplementaryCodePoint(intValue)
36+ def isTitleCase : Boolean = Character .isTitleCase(intValue)
37+ def isUnicodeIdentifierPart : Boolean = Character .isUnicodeIdentifierPart(intValue)
38+ def isUnicodeIdentifierStart : Boolean = Character .isUnicodeIdentifierStart(intValue)
39+ def isUpperCase : Boolean = Character .isUpperCase(intValue)
40+ def isWhitespace : Boolean = Character .isWhitespace(intValue)
41+ def toLowerCase : CodePoint = new CodePoint (Character .toLowerCase(intValue))
42+ def toTitleCase : CodePoint = new CodePoint (Character .toTitleCase(intValue))
43+ def toUpperCase : CodePoint = new CodePoint (Character .toUpperCase(intValue))
4544}
4645
4746object CodePoint {
48- val MaxValue : CodePoint = new CodePoint (Character .MAX_CODE_POINT )
49- val MinValue : CodePoint = new CodePoint (Character .MIN_CODE_POINT )
47+ val MaxValue : CodePoint = new CodePoint (Character .MAX_CODE_POINT )
48+ val MinValue : CodePoint = new CodePoint (Character .MIN_CODE_POINT )
5049
51- def apply (cp: Char ): CodePoint = new CodePoint (cp.toInt)
52- def apply (cp: Int ): Option [CodePoint ] = if (Character .isValidCodePoint(cp)) Option (new CodePoint (cp)) else None
50+ def apply (cp: Char ) : CodePoint = new CodePoint (cp.toInt)
51+ def apply (cp: Int ) : Option [CodePoint ] = if (Character .isValidCodePoint(cp)) Option (new CodePoint (cp)) else None
5352
54- def unsafe_apply (cp: Int ): CodePoint = new CodePoint (cp)
53+ def unsafe_apply (cp: Int ) : CodePoint = new CodePoint (cp)
5554
56- implicit def char2Codepoint (c: Char ): CodePoint = new CodePoint (c.toInt)
55+ implicit def char2Codepoint (c: Char ) : CodePoint = new CodePoint (c.toInt)
5756
58- implicit def orderingCodepoint : Ordering [CodePoint ] = Ordering .Int .on(_.intValue)
57+ implicit def orderingCodepoint : Ordering [CodePoint ] = Ordering .Int .on(_.intValue)
5958}
0 commit comments