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/Int

Int

scala.Int
See theInt companion class
objectInt

Attributes

Companion
class
Source
Int.scala
Graph
Supertypes
classObject
traitMatchable
classAny
Self type
Int.type

Members list

Value members

Concrete methods

Transform a value type into a boxed reference type.

Transform a value type into a boxed reference type.

Runtime implementation determined byscala.runtime.BoxesRunTime.boxToInteger. Seesrc/library/scala/runtime/BoxesRunTime.java.

Value parameters

x

the Int to be boxed

Attributes

Returns

a java.lang.Integer offeringx as its underlying value.

Source
Int.scala
overridedeftoString:String

The String representation of the scala.Int companion object.

The String representation of the scala.Int companion object.

Attributes

Definition Classes
Source
Int.scala

Transform a boxed type into a value type.

Transform a boxed type into a value type. Note that this method is not typesafe: it accepts any Object, but will throw an exception if the argument is not a java.lang.Integer.

Runtime implementation determined byscala.runtime.BoxesRunTime.unboxToInt. Seesrc/library/scala/runtime/BoxesRunTime.java.

Value parameters

x

the java.lang.Integer to be unboxed.

Attributes

Returns

the Int resulting from calling intValue() onx

Throws

ClassCastException if the argument is not a java.lang.Integer

Source
Int.scala

Concrete fields

finalvalMaxValue: 2147483647

The largest value representable as an Int.

The largest value representable as an Int.

Attributes

Source
Int.scala
finalvalMinValue: -2147483648

The smallest value representable as an Int.

The smallest value representable as an Int.

Attributes

Source
Int.scala

Implicits

Implicits

implicitdefint2double(x:Int):Double

Attributes

Source
Int.scala
implicitdefint2long(x:Int):Long

Attributes

Source
Int.scala

Deprecated implicits

implicitdefint2float(x:Int):Float

Attributes

Deprecated
[Since version 2.13.1]Implicit conversion from Int to Float is dangerous because it loses precision. Write `.toFloat` instead.
Source
Int.scala
In this article
Generated with
Copyright (c) 2002-2025, LAMP/EPFL
Copyright (c) 2002-2025, LAMP/EPFL

[8]ページ先頭

©2009-2025 Movatter.jp