Movatterモバイル変換


[0]ホーム

URL:


Scala 3
3.7.4
LearnInstallPlaygroundFind A LibraryCommunityBlog
Scala 3
LearnInstallPlaygroundFind A LibraryCommunityBlog
DocsAPI
Generated with
Copyright (c) 2002-2025, LAMP/EPFL
Copyright (c) 2002-2025, LAMP/EPFL
Scala 3/scala/scala.math/Numeric/CharIsIntegral

CharIsIntegral

scala.math.Numeric.CharIsIntegral
See theCharIsIntegral companion trait

Attributes

Companion
trait
Source
Numeric.scala
Graph
Supertypes
traitIntegral[Char]
traitNumeric[Char]
traitOrdering[Char]
traitEquiv[Char]
classObject
traitMatchable
classAny
Show all
Self type

Members list

Type members

Inherited classlikes

classIntegralOps(lhs:Integral.this.T) extendsNumericOps

Attributes

Inherited from:
Integral
Source
Integral.scala
Supertypes
classIntegral.this.NumericOps
classObject
traitMatchable
classAny
classNumericOps(lhs:Numeric.this.T)

Attributes

Inherited from:
Numeric
Source
Numeric.scala
Supertypes
classObject
traitMatchable
classAny
Known subtypes
classOrderingOps(lhs:Ordering.this.T)

This inner class defines comparison operators available forT.

This inner class defines comparison operators available forT.

It can't extendAnyVal because it is not a top-level class or a member of a statically accessible object.

Attributes

Inherited from:
Ordering
Source
Ordering.scala
Supertypes
classObject
traitMatchable
classAny

Value members

Inherited methods

defabs(x:Char):Char

Attributes

Inherited from:
Numeric
Source
Numeric.scala

Returns an integer whose sign communicates how x compares to y.

Returns an integer whose sign communicates how x compares to y.

The result sign has the following meaning:

- negative if x < y - positive if x > y - zero otherwise (if x == y)

Attributes

Inherited from:
CharOrdering
Source
Ordering.scala
overridedefequiv(x:Char,y:Char):Boolean

Return true ifx ==y in the ordering.

Return true ifx ==y in the ordering.

Attributes

Definition Classes
Inherited from:
Ordering
Source
Ordering.scala

Attributes

Inherited from:
CharIsIntegral
Source
Numeric.scala
overridedefgt(x:Char,y:Char):Boolean

Return true ifx >y in the ordering.

Return true ifx >y in the ordering.

Attributes

Definition Classes
Inherited from:
Ordering
Source
Ordering.scala
overridedefgteq(x:Char,y:Char):Boolean

Return true ifx >=y in the ordering.

Return true ifx >=y in the ordering.

Attributes

Definition Classes
Inherited from:
Ordering
Source
Ordering.scala

Returns whether or not the other ordering is the opposite ordering of this one.

Returns whether or not the other ordering is the opposite ordering of this one.

Equivalent toother == this.reverse.

Implementations should only override this method if they are overridingreverse as well.

Attributes

Inherited from:
Ordering
Source
Ordering.scala
overridedeflt(x:Char,y:Char):Boolean

Return true ifx <y in the ordering.

Return true ifx <y in the ordering.

Attributes

Definition Classes
Inherited from:
Ordering
Source
Ordering.scala
overridedeflteq(x:Char,y:Char):Boolean

Return true ifx <=y in the ordering.

Return true ifx <=y in the ordering.

Attributes

Definition Classes
Inherited from:
Ordering
Source
Ordering.scala
defmax[U <:Char](x:U,y:U):U

Returnx ifx >=y, otherwisey.

Returnx ifx >=y, otherwisey.

Attributes

Inherited from:
Ordering
Source
Ordering.scala
defmin[U <:Char](x:U,y:U):U

Returnx ifx <=y, otherwisey.

Returnx ifx <=y, otherwisey.

Attributes

Inherited from:
Ordering
Source
Ordering.scala

Attributes

Inherited from:
CharIsIntegral
Source
Numeric.scala

Attributes

Inherited from:
CharIsIntegral
Source
Numeric.scala
defon[U](f:U=>Char):Ordering[U]

Given f, a function from U into T, creates an Ordering[U] whose compare function is equivalent to:

Given f, a function from U into T, creates an Ordering[U] whose compare function is equivalent to:

def compare(x:U, y:U) = Ordering[T].compare(f(x), f(y))

Attributes

Inherited from:
Ordering
Source
Ordering.scala

Attributes

Inherited from:
Numeric
Source
Numeric.scala

Creates an Ordering[T] whose compare function returns the result of this Ordering's compare function, if it is non-zero, or else the result ofothers compare function.

Creates an Ordering[T] whose compare function returns the result of this Ordering's compare function, if it is non-zero, or else the result ofothers compare function.

Value parameters

other

an Ordering to use if this Ordering returns zero

Attributes

Example

case class Pair(a: Int, b: Int)val pairOrdering = Ordering.by[Pair, Int](_.a)                          .orElse(Ordering.by[Pair, Int](_.b))
Inherited from:
Ordering
Source
Ordering.scala
deforElseBy[S](f:Char=>S)(implicitord:Ordering[S]):Ordering[Char]

Given f, a function from T into S, creates an Ordering[T] whose compare function returns the result of this Ordering's compare function, if it is non-zero, or else a result equivalent to:

Given f, a function from T into S, creates an Ordering[T] whose compare function returns the result of this Ordering's compare function, if it is non-zero, or else a result equivalent to:

Ordering[S].compare(f(x), f(y))

This function is equivalent to passing the result ofOrdering.by(f) toorElse.

Attributes

Example

case class Pair(a: Int, b: Int)val pairOrdering = Ordering.by[Pair, Int](_.a)                          .orElseBy[Int](_.b)
Inherited from:
Ordering
Source
Ordering.scala

Attributes

Inherited from:
CharIsIntegral
Source
Numeric.scala
defplus(x:Char,y:Char):Char

Attributes

Inherited from:
CharIsIntegral
Source
Numeric.scala
defquot(x:Char,y:Char):Char

Attributes

Inherited from:
CharIsIntegral
Source
Numeric.scala
defrem(x:Char,y:Char):Char

Attributes

Inherited from:
CharIsIntegral
Source
Numeric.scala
overridedefreverse:Ordering[Char]

Return the opposite ordering of this one.

Return the opposite ordering of this one.

Implementations overriding this method MUST overrideisReverseOf as well if they change the behavior at all (for example, caching does not require overriding it).

Attributes

Definition Classes
Inherited from:
Ordering
Source
Ordering.scala

Attributes

Inherited from:
Comparator
overridedefsign(x:Char):Char

Attributes

Definition Classes
Inherited from:
CharIsIntegral
Source
Numeric.scala
overridedefsignum(x:Char):Int

Attributes

Definition Classes
Inherited from:
CharIsIntegral
Source
Numeric.scala
defthenComparing[U <:Comparable[_ >:U <:<FromJavaObject>]](x$0:Function[_ >:Char <:<FromJavaObject>,_ <:U]):Comparator[Char]

Attributes

Inherited from:
Comparator
defthenComparing[U <:<FromJavaObject>](x$0:Function[_ >:Char <:<FromJavaObject>,_ <:U],x$1:Comparator[_ >:U <:<FromJavaObject>]):Comparator[Char]

Attributes

Inherited from:
Comparator
defthenComparing(x$0:Comparator[_ >:Char <:<FromJavaObject>]):Comparator[Char]

Attributes

Inherited from:
Comparator

Attributes

Inherited from:
Comparator
defthenComparingInt(x$0:ToIntFunction[_ >:Char <:<FromJavaObject>]):Comparator[Char]

Attributes

Inherited from:
Comparator

Attributes

Inherited from:
Comparator

Attributes

Inherited from:
CharIsIntegral
Source
Numeric.scala

Attributes

Inherited from:
CharIsIntegral
Source
Numeric.scala

Attributes

Inherited from:
CharIsIntegral
Source
Numeric.scala
deftoInt(x:Char):Int

Attributes

Inherited from:
CharIsIntegral
Source
Numeric.scala

Attributes

Inherited from:
CharIsIntegral
Source
Numeric.scala

Returns whether a comparison betweenx andy is defined, and if so the result ofcompare(x, y).

Returns whether a comparison betweenx andy is defined, and if so the result ofcompare(x, y).

Attributes

Inherited from:
Ordering
Source
Ordering.scala

Attributes

Inherited from:
Numeric
Source
Numeric.scala

Implicits

Inherited implicits

implicit overridedefmkNumericOps(lhs:Char):IntegralOps

Attributes

Definition Classes
Inherited from:
Integral
Source
Integral.scala

This implicit method augmentsT with the comparison operators defined inscala.math.Ordering.Ops.

This implicit method augmentsT with the comparison operators defined inscala.math.Ordering.Ops.

Attributes

Inherited from:
Ordering
Source
Ordering.scala
In this article
Generated with
Copyright (c) 2002-2025, LAMP/EPFL
Copyright (c) 2002-2025, LAMP/EPFL

[8]ページ先頭

©2009-2025 Movatter.jp