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.util/scala.util.control/Breaks

Breaks

scala.util.control.Breaks
See theBreaks companion class
objectBreaks extendsBreaks

An object that can be used for the break control abstraction.

Example usage:

import Breaks.{break, breakable}breakable {  for (...) {    if (...) break  }}

Attributes

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

Members list

Type members

Inherited classlikes

sealedtraitTryBlock[T]

Attributes

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

Value members

Inherited methods

Break from the dynamically closest enclosing breakable block that also uses thisBreaks instance.

Break from the dynamically closest enclosing breakable block that also uses thisBreaks instance.

Attributes

Note

This might be different from the statically closest enclosing block!

Invocation without parentheses relies on the conversion to "empty application".

Inherited from:
Breaks
Source
Breaks.scala

A block from which one can exit with abreak.

A block from which one can exit with abreak. Thebreak may be executed further down in the call stack provided that it is called on the exact same instance ofBreaks.

Attributes

Inherited from:
Breaks
Source
Breaks.scala
deftryBreakable[T](op:=>T):TryBlock[T]

Try a computation that produces a value, supplying a default to be used if the computation terminates with abreak.

Try a computation that produces a value, supplying a default to be used if the computation terminates with abreak.

tryBreakable { (1 to 3).map(i => if (math.random < .5) break else i * 2)} catchBreak { Vector.empty}

Attributes

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

[8]ページ先頭

©2009-2025 Movatter.jp