# Scalaライブラリ

**URL:** https://forum.ficusonline.com/t/topic/389
**Category:** Programming
**Created:** [2020 年 10 月 29 日午前 3:08 UTC](https://forum.ficusonline.com/t/topic/389 "2020-10-29T03:08:48Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![tk-fuse](https://forum.ficusonline.com/user_avatar/forum.ficusonline.com/tk-fuse/32/255_2.png) [@tk-fuse](https://forum.ficusonline.com/u/tk-fuse)
#### Post date: [2020 年 10 月 29 日午前 3:08 UTC](https://forum.ficusonline.com/t/topic/389/1 "2020-10-29T03:08:48Z")

</div>

## Scala標準ライブラリ

[https://www.scala-lang.org/api/current/scala/index.html](https://www.scala-lang.org/api/current/scala/index.html)

* * *

## Mavenレポジトリ

[https://mvnrepository.com/search?q=scala](https://mvnrepository.com/search?q=scala)

 ![maven-repo-scala](https://forum.ficusonline.com/uploads/default/original/1X/cba06434b156409264b7b69c4bd3e274d0f48da8.png)

* * *

## scala.collection.immutable

[https://www.scala-lang.org/api/current/scala/collection/immutable/index.html](https://www.scala-lang.org/api/current/scala/collection/immutable/index.html)

* * *

## scala.collection.mutable

[https://www.scala-lang.org/api/current/scala/collection/mutable/index.html](https://www.scala-lang.org/api/current/scala/collection/mutable/index.html)

* * *

## Set

`import scala.collection.immutable(or mutable etc...)`

> **[The Set Class](https://docs.scala-lang.org/overviews/scala-book/set-class.html#inner-main)**
>
>    This page has a new version. | This page provides examples of the Scala 'Set' class, including how to add and remove elements from a Set, and iterate over Set elements.

> **[Sets](https://docs.scala-lang.org/overviews/collections-2.13/sets.html#inner-main)**
>
> Sets are Iterables that contain no duplicate elements. The operations on sets are summarized in the following tables for general sets, immutable sets and mutable sets. They fall into the following categories:

**immurtable**

> **[Set](https://www.scala-lang.org/api/current/scala/collection/immutable/Set.html)**

**mutable**

> **[Set](https://www.scala-lang.org/api/current/scala/collection/mutable/Set.html)**

* * *

## Seq

繰り返し作業（シーケンス）を設定するトレイト。メンバーは **Seq** ライブラリ参照のこと。

> **[length - The sequence traits Seq, IndexedSeq, and LinearSeq](https://docs.scala-lang.org/overviews/collections/seqs.html#inner-main)**
>
>    This page has a new version.

`import scala.collection.immutable(or mutable etc...)`

**immutable**

> **[Seq](https://www.scala-lang.org/api/current/scala/collection/immutable/Seq.html)**

**mutable**

> **[Seq](https://www.scala-lang.org/api/current/scala/collection/mutable/Seq.html)**

* * *

## Vector

> **[The Vector Class](https://docs.scala-lang.org/overviews/scala-book/vector-class.html)**
>
> This page provides examples of the Scala 'Vector' class, including how to add and remove elements from a Vector.

**immutable**

> **[Vector](https://www.scala-lang.org/api/current/scala/collection/immutable/Vector.html)**

* * *

## Option

**Option/Some/None**  
Some, NoneはOptionのサブクラス。

> **[Using Option/Some/None - No Null Values](https://docs.scala-lang.org/overviews/scala-book/no-null-values.html#using-optionsomenone)**
>
>    This page has a new version. | This lesson demonstrates the Scala Option, Some, and None classes, including how to use them instead of null values.

**Ex)**

```auto
def toInt(s: String): Option[Int] = {
    try {
        Some(Integer.parseInt(s.trim))
    } catch {
        case e: Exception => None
    }
}

```

**出力**

入力が **Int** の時は **Some** を返す。 **String** の時は **toInt** できないので **None** を返す。

```auto
scala> val a = toInt("1")
a: Option[Int] = Some(1)

scala> val a = toInt("foo")
a: Option[Int] = None

```

> **[Option](https://www.scala-lang.org/api/current/scala/Option.html)**

---

<div class="post-metadata">

### Author: ![tk-fuse](https://forum.ficusonline.com/user_avatar/forum.ficusonline.com/tk-fuse/32/255_2.png) [@tk-fuse](https://forum.ficusonline.com/u/tk-fuse)
#### Post date: [2020 年 11 月 18 日午後 2:30 UTC](https://forum.ficusonline.com/t/topic/389/2 "2020-11-18T14:30:07Z")

</div>

## SeqとListの違い

> <https://stackoverflow.com/questions/10866639/difference-between-a-seq-and-a-list-in-scala>

### HOW ARE THE COLLECTIONS STRUCTURED? WHICH ONE SHOULD I CHOOSE?

> **[Redirecting…](https://docs.scala-lang.org/tutorials/FAQ/collections.html)**

**Immutable Collections Diagram**

 ![collections-immutable](https://forum.ficusonline.com/uploads/default/original/1X/3246f066e25e5f3af82a30f9296261e6615fdb6b.png)

**Mutable Collections Diagram**

 ![collections-mutable](https://forum.ficusonline.com/uploads/default/original/1X/824c6833c17d0628601f2a3c09c40e571effe020.png)

---

<div class="post-metadata">

### Author: ![tk-fuse](https://forum.ficusonline.com/user_avatar/forum.ficusonline.com/tk-fuse/32/255_2.png) [@tk-fuse](https://forum.ficusonline.com/u/tk-fuse)
#### Post date: [2020 年 11 月 27 日午前 5:36 UTC](https://forum.ficusonline.com/t/topic/389/3 "2020-11-27T05:36:50Z")

</div>

## scala-logging

> **[GitHub - lightbend-labs/scala-logging: Convenient and performant logging library for...](https://github.com/lightbend-labs/scala-logging)**
>
> Convenient and performant logging library for Scala wrapping SLF4J.

**akka-actor-typed** には **slf4j-api** が含まれています。

> **[Logging • Akka core](https://doc.akka.io/libraries/akka-core/current/typed/logging.html)**
>
> Logging options with Akka.
