sealed abstract class Size extends AnyRef
Extended integer representation of sizes.
This class is used to represent the lengths of matched strings. Unbounded values are generated by things like the Kleene star operator.
Size supports addition and multiplication. Additionally, Size has a total ordering (unbounded values are considered), so comparisons are also supported.
Sizes are required to be non-negative, i.e. 0 <= size < ∞.
- Self Type
- Size
- Alphabetic
- By Inheritance
- Size
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
- def *(rhs: Size): Size
- def +(rhs: Size): Size
- def <(rhs: Size): Boolean
- def <=(rhs: Size): Boolean
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- def >(rhs: Size): Boolean
- def >=(rhs: Size): Boolean
-
def
approxString: String
Show approximate as well as actual size as a string.
Show approximate as well as actual size as a string.
For unbounded or small sizes, this method is identical to toString.
For finite sizes a million or larger, this method will return scientific notation to approximate the number followed by the full decimal representation in parenthesis.
Size(0).approxString // 0 Size(123456).approxString // 123456 Size(1234567).approxString // 1.23 x 106 (1234567) Size(1234567).pow(3).approxString // 1.88 x 1018 (1881672302290562263) Size.Unbounded.approxString // ∞
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
- def compare(rhs: Size): Int
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def isFinite: Boolean
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def max(rhs: Size): Size
- def min(rhs: Size): Size
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- def pow(k: Int): Size
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- Size → AnyRef → Any
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()