Skip to content

Commit 5d402ab

Browse files
committed
Rename cardinal to integer
1 parent 4bd1647 commit 5d402ab

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

project/GenerateAnyVals.scala

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -35,13 +35,13 @@ import scala.language.implicitConversions"""
3535
else coercionComment.linesIterator.toList ++ coercions
3636
}
3737

38-
def isCardinal: Boolean = isIntegerType(this)
38+
def isInteger: Boolean = isIntegerType(this)
3939
def unaryOps = {
4040
val ops = List(
4141
Op("+", "/** Returns this value, unmodified. */"),
4242
Op("-", "/** Returns the negation of this value. */"))
4343

44-
if(isCardinal)
44+
if(isInteger)
4545
Op("~", "/**\n" +
4646
" * Returns the bitwise negation of this value.\n" +
4747
" * @example {{{\n" +
@@ -54,7 +54,7 @@ import scala.language.implicitConversions"""
5454
}
5555

5656
def bitwiseOps =
57-
if (isCardinal)
57+
if (isInteger)
5858
List(
5959
Op("|", "/**\n" +
6060
" * Returns the bitwise OR of this value and `x`.\n" +
@@ -89,7 +89,7 @@ import scala.language.implicitConversions"""
8989
else Nil
9090

9191
def shiftOps =
92-
if (isCardinal)
92+
if (isInteger)
9393
List(
9494
Op("<<", "/**\n" +
9595
" * Returns this value bit-shifted left by the specified number of bits,\n" +
@@ -164,7 +164,7 @@ import scala.language.implicitConversions"""
164164
val xs1 = List(mkCoercions, mkUnaryOps, mkStringOps, mkShiftOps) map (xs => if (xs.isEmpty) xs else xs :+ "")
165165
val xs2 = List(
166166
mkBinOpsGroup(comparisonOps, numeric, _ => Z),
167-
mkBinOpsGroup(bitwiseOps, cardinal, this opType _),
167+
mkBinOpsGroup(bitwiseOps, integer, this opType _),
168168
mkBinOpsGroup(otherOps, numeric, this opType _)
169169
)
170170
xs1 ++ xs2
@@ -179,7 +179,7 @@ import scala.language.implicitConversions"""
179179
res ++ xs
180180
}
181181
def objectLines = {
182-
val comp = if (isCardinal) cardinalCompanion else floatingCompanion
182+
val comp = if (isInteger) integerCompanion else floatingCompanion
183183
interpolate(comp + allCompanions + "\n" + nonUnitCompanions).trim.linesIterator.toList ++ (implicitCoercions map interpolate)
184184
}
185185

@@ -333,7 +333,7 @@ override def toString = "object scala.@name@"
333333

334334
def nonUnitCompanions = "" // todo
335335

336-
def cardinalCompanion = """
336+
def integerCompanion = """
337337
/** The smallest value representable as @article@ @name@. */
338338
final val MinValue = @[email protected]_VALUE
339339
@@ -497,7 +497,7 @@ override def getClass(): Class[Boolean] = ???
497497
def isFloatingType = Set(F, D)
498498
def isWideType = Set(L, D)
499499

500-
def cardinal = numeric filter isIntegerType
500+
def integer = numeric filter isIntegerType
501501
def numeric = List(B, S, C, I, L, F, D)
502502
def values = List(U, Z) ++ numeric
503503

0 commit comments

Comments
 (0)