implicit class StrNum extends Numeric[StrNum] with Ordered[StrNum] with Serializable
The StrNum
implicit class is used to represent and operate on string
numbers. Internally, a string number is represented as String.
The semantics of StrNum
operators are similar those in Pike.
- See also
http://docs.roxen.com/pike/7.0/tutorial/strings/operators.xml ---------------------------------------------------------------------
- Alphabetic
- By Inheritance
- StrNum
- Ordered
- Comparable
- Numeric
- Ordering
- PartialOrdering
- Equiv
- Serializable
- Serializable
- Comparator
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
-
new
StrNum(ss: String)
- ss
the underlying string
Type Members
-
class
Ops extends AnyRef
- Definition Classes
- Numeric
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
!=~(s: StrNum): Boolean
Return whether two string numbers not are nearly equal.
Return whether two string numbers not are nearly equal.
- s
compare this with s
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
def
*(s: StrNum): StrNum
Multiply two string numbers, by replacing 'SP' by 's'.
Multiply two string numbers, by replacing 'SP' by 's'.
- s
multiply this times s
-
def
+(s: StrNum): StrNum
Add two string numbers.
Add two string numbers.
- s
add string s to this
-
def
-(s: StrNum): StrNum
Subtract two string numbers.
Subtract two string numbers.
- s
subtract s from this
-
def
/(s: StrNum): StrNum
Divide two string numbers, by replacing 's' by 'SP.
Divide two string numbers, by replacing 's' by 'SP.
- s
divide this by s
-
def
<(that: StrNum): Boolean
- Definition Classes
- Ordered
-
def
<=(that: StrNum): Boolean
- Definition Classes
- Ordered
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
=~(s: StrNum): Boolean
Return whether two string numbers are nearly equal.
Return whether two string numbers are nearly equal.
- s
compare this with s
-
def
>(that: StrNum): Boolean
- Definition Classes
- Ordered
-
def
>=(that: StrNum): Boolean
- Definition Classes
- Ordered
-
def
abs(x: StrNum): StrNum
- Definition Classes
- Numeric
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
-
def
compare(s: StrNum, t: StrNum): Int
Compare 'this' string number with that string number 't'.
Compare 'this' string number with that string number 't'.
- t
that string number
- Definition Classes
- StrNum → Ordering → Comparator
-
def
compare(s: StrNum): Int
Compare two string numbers (negative for <, zero for ==, positive for >).
Compare two string numbers (negative for <, zero for ==, positive for >).
- s
the first string number to compare
- Definition Classes
- StrNum → Ordered
-
def
compareTo(that: StrNum): Int
- Definition Classes
- Ordered → Comparable
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(s: Any): Boolean
Override equals to determine whether 'this' string number equals string 's'.
Override equals to determine whether 'this' string number equals string 's'.
- s
the string number to compare with this
- Definition Classes
- StrNum → Comparator → AnyRef → Any
-
def
equiv(x: StrNum, y: StrNum): Boolean
- Definition Classes
- Ordering → PartialOrdering → Equiv
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
def
fromDouble(d: Double): StrNum
Create a string number from a
Double
.Create a string number from a
Double
.- d
the source double
-
def
fromInt(n: Int): StrNum
Create a string number from an
Int
. -
def
getBytes(): Array[Byte]
Get the bytes for 'this' string number.
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
gt(x: StrNum, y: StrNum): Boolean
- Definition Classes
- Ordering → PartialOrdering
-
def
gteq(x: StrNum, y: StrNum): Boolean
- Definition Classes
- Ordering → PartialOrdering
-
def
hashCode(): Int
Must also override hashCode to be be compatible with equals.
Must also override hashCode to be be compatible with equals.
- Definition Classes
- StrNum → AnyRef → Any
-
def
in(set: Set[StrNum]): Boolean
Determine whether 'this' is in the given set.
-
def
in(lim: (StrNum, StrNum)): Boolean
Determine whether 'this' is within the given bounds
Determine whether 'this' is within the given bounds
- lim
the given (lower, upper) bounds
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
def
lt(x: StrNum, y: StrNum): Boolean
- Definition Classes
- Ordering → PartialOrdering
-
def
lteq(x: StrNum, y: StrNum): Boolean
- Definition Classes
- Ordering → PartialOrdering
-
def
max(s: StrNum): StrNum
Return the maximum of 'this' and 's' string numbers.
Return the maximum of 'this' and 's' string numbers.
- s
that string number to compare with this
-
def
max(x: StrNum, y: StrNum): StrNum
- Definition Classes
- Ordering
-
def
min(s: StrNum): StrNum
Return the minimum of 'this' and 's' string numbers.
Return the minimum of 'this' and 's' string numbers.
- s
that string number to compare with this
-
def
min(x: StrNum, y: StrNum): StrNum
- Definition Classes
- Ordering
-
def
minus(s: StrNum, t: StrNum): StrNum
- Definition Classes
- StrNum → Numeric
-
implicit
def
mkNumericOps(lhs: StrNum): Ops
- Definition Classes
- Numeric
-
implicit
def
mkOrderingOps(lhs: StrNum): StrNum.Ops
- Definition Classes
- Ordering
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
negate(s: StrNum): StrNum
- Definition Classes
- StrNum → Numeric
-
def
not_in(set: Set[StrNum]): Boolean
Determine whether 'this' is not in the given set.
-
def
not_in(lim: (StrNum, StrNum)): Boolean
Determine whether 'this' is not within the given bounds
Determine whether 'this' is not within the given bounds
- lim
the given (lower, upper) bounds
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
def
on[U](f: (U) ⇒ StrNum): Ordering[U]
- Definition Classes
- Ordering
-
def
one: StrNum
- Definition Classes
- Numeric
-
def
plus(s: StrNum, t: StrNum): StrNum
- Definition Classes
- StrNum → Numeric
- def pow(s: StrNum, r: StrNum): StrNum
-
def
reverse: Ordering[StrNum]
- Definition Classes
- Ordering → PartialOrdering
-
def
reversed(): Comparator[StrNum]
- Definition Classes
- Comparator
-
def
signum(x: StrNum): Int
- Definition Classes
- Numeric
- val ss: String
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
thenComparing[U <: Comparable[_ >: U]](arg0: Function[_ >: StrNum, _ <: U]): Comparator[StrNum]
- Definition Classes
- Comparator
-
def
thenComparing[U](arg0: Function[_ >: StrNum, _ <: U], arg1: Comparator[_ >: U]): Comparator[StrNum]
- Definition Classes
- Comparator
-
def
thenComparing(arg0: Comparator[_ >: StrNum]): Comparator[StrNum]
- Definition Classes
- Comparator
-
def
thenComparingDouble(arg0: ToDoubleFunction[_ >: StrNum]): Comparator[StrNum]
- Definition Classes
- Comparator
-
def
thenComparingInt(arg0: ToIntFunction[_ >: StrNum]): Comparator[StrNum]
- Definition Classes
- Comparator
-
def
thenComparingLong(arg0: ToLongFunction[_ >: StrNum]): Comparator[StrNum]
- Definition Classes
- Comparator
-
def
times(s: StrNum, t: StrNum): StrNum
- Definition Classes
- StrNum → Numeric
- def toComplex: Complex
-
def
toComplex(s: StrNum): Complex
Convert 'this' string number to a
Complex
.Convert 'this' string number to a
Complex
.- s
that string number to convert
- def toDouble: Double
-
def
toDouble(s: StrNum): Double
Convert 'this' string number to a
Double
.Convert 'this' string number to a
Double
.- s
that string number to convert
- Definition Classes
- StrNum → Numeric
- def toFloat: Float
-
def
toFloat(s: StrNum): Float
Convert 'this' string number to a
Float
.Convert 'this' string number to a
Float
.- s
that string number to convert
- Definition Classes
- StrNum → Numeric
- def toInt: Int
-
def
toInt(s: StrNum): Int
Convert 'this' string number to an
Int
.Convert 'this' string number to an
Int
.- s
that string number to convert
- Definition Classes
- StrNum → Numeric
- def toLong: Long
-
def
toLong(s: StrNum): Long
Convert 'this' string number to a
Long
.Convert 'this' string number to a
Long
.- s
that string number to convert
- Definition Classes
- StrNum → Numeric
- def toRational: Rational
-
def
toRational(s: StrNum): Rational
Convert 'this' string number to a
Rational
.Convert 'this' string number to a
Rational
.- s
that string number to convert
- def toReal: Real
-
def
toReal(s: StrNum): Real
Convert 'this' string number to a
Real
.Convert 'this' string number to a
Real
.- s
that string number to convert
-
def
toStrNum: StrNum
Convert 'this' string number to a
StrNum
. -
def
toString(): String
Convert 'this' string number to a String.
Convert 'this' string number to a String.
- Definition Classes
- StrNum → AnyRef → Any
-
def
tryCompare(x: StrNum, y: StrNum): Some[Int]
- Definition Classes
- Ordering → PartialOrdering
-
def
unary_-(): StrNum
Compute the unary minus (-).
-
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
- @native() @throws( ... )
-
def
zero: StrNum
- Definition Classes
- Numeric
-
def
~^(r: StrNum): StrNum
Raise a string to the 'r'-th power.
Raise a string to the 'r'-th power.
- r
the power/exponent
- def ↑(r: StrNum): StrNum
- def ∈(set: Set[StrNum]): Boolean
- def ∈(lim: (StrNum, StrNum)): Boolean
- def ∉(set: Set[StrNum]): Boolean
- def ∉(lim: (StrNum, StrNum)): Boolean
- def ≈(s: StrNum): Boolean
- def ≉(s: StrNum): Boolean
-
def
≠(t: StrNum): Boolean
Compare 'this' string number with that string number 't' for inequality.
Compare 'this' string number with that string number 't' for inequality.
- t
that string number
-
def
≤(t: StrNum): Boolean
Compare 'this' string number with that string number 't' for less than or equal to.
Compare 'this' string number with that string number 't' for less than or equal to.
- t
that string number
-
def
≥(t: StrNum): Boolean
Compare 'this' string number with that string number 't' for greater than or equal to.
Compare 'this' string number with that string number 't' for greater than or equal to.
- t
that string number