Util
- Source
- __.scala
Member
ByteCount is an opaque Long value, used to indicate something like "File size" or "memory allocation", whatever is counted in bytes
Byte Size
ByteCount is an opaque Long value, used to indicate something like "File size" or "memory allocation", whatever is counted in bytes
- Source
- ByteCount.scala
ByteCount is an opaque Long value, used to indicate something like "File size" or "memory allocation", whatever is counted in bytes
Byte Size
ByteCount is an opaque Long value, used to indicate something like "File size" or "memory allocation", whatever is counted in bytes
- Source
- ByteCount.scala
Percent is an opaque Double value
Percent is an opaque Double value
Percent can be created with method constructors on primitives
3.Percent.tp // Prints: 3.0%
3.14.Percent.tp // Prints: 3.14%
- Source
- Percent.scala
Percent is an opaque Double value
Percent is an opaque Double value
Percent can be created with method constructors on primitives
3.Percent.tp // Prints: 3.0%
3.14.Percent.tp // Prints: 3.14%
- Source
- Percent.scala
Bi-Directional Function
TwoWayFun allows to convert value to some type and back
It is used in two way binded collections
val intToChar: TwoWayFun[Int,Char] = TwoWayFun(i => ('A' + i).toChar, _ - 'A')
val list: Idx.M[Int] = Stream(0, 2, 4).toBuffer
val view: Idx.M[Char] = list.twoWay_^(intToChar)
list.~.tp // Prints ~(0, 2, 4)
view.~.tp // Prints ~(A, C, E)
view(1) = 'Z' // Note, only second collection is updated, but both are changed
list.~.tp // Prints ~(0, 25, 4)
view.~.tp // Prints ~(A, Z, E)
- Companion
- object
- Source
- TwoWayFun.scala
Bi-Directional Function
TwoWayFun allows to convert value to some type and back
It is used in two way binded collections
val intToChar: TwoWayFun[Int,Char] = TwoWayFun(i => ('A' + i).toChar, _ - 'A')
val list: Idx.M[Int] = Stream(0, 2, 4).toBuffer
val view: Idx.M[Char] = list.twoWay_^(intToChar)
list.~.tp // Prints ~(0, 2, 4)
view.~.tp // Prints ~(A, C, E)
view(1) = 'Z' // Note, only second collection is updated, but both are changed
list.~.tp // Prints ~(0, 25, 4)
view.~.tp // Prints ~(A, Z, E)
- Companion
- object
- Source
- TwoWayFun.scala