雲:scalaパッケージ概観(2.7.1)
ここでは詳細には触れず、もっぱら概要のみを数語程度で述べるに留める。なお、現在Scalaはようやく言語仕様とコンパイラが完成してライブラリはこれから、という段階である上に、開発チームの念頭にあるのはまず第一に平行分散コンピューティングに役立つ機能であって、その他特にスクリプティング用のものは(とりあえずは)プラットフォームのそれに任せる、という方針なようなのだから、その系の機能を欲する人々は、開発チームに頼らず自前でそうしたライブラリを工面するべきであろう、と思われる。なお、言語仕様要約と同様に、"~"は任意の数字、"&"は任意の文字列を示す。また、名前に続く括弧内は、最初の名前は親クラス、以降は親トレイト(群)を示す。
シングルトン(普通"extends AnyRef")
Predef: 標準定義
Predef.Pair: ペアタプル(内部使用)
Predef.Triple: トリオタプル(内部使用)
Tuple~: タプル生成用(内部使用)
Product~: タプルパターン用(内部使用)
Array: 配列生成用
List: リスト生成用
::: リストパターン用(内部使用)
Nil(case, List[Nothing], Product): 空リスト
StringBuilder: 可変文字列。同期保証無し(javaのそれと同じ)
Iterable: Iterableクラスメソッド提供
Iterator: Iterator生成用
BufferedIterator: 先読みイテレータ生成用?
Console: (ANSI)コンソール操作用(標準入出力の切り替え等)
Stream: Stream(要素遅延評価リスト)クラスメソッド提供
Stream.cons: Stream生成用
Stream.lazy_::: Stream用の遅延評価な"::"
Symbol: シンボル生成用
Seq: Seq生成用
Range: Intからmapメソッド等に使えるデータを生成
Option: Optionからイテレータ生成(内部使用?)
None(case, Option[Nothing]): Optionの2つの値のうちの1つ
Some: Optionの2つの値のうちの1つ
Either: Either(2つの型のいずれか)生成用
Left: Eitherパターン用
Right: Eitherパターン用
Math: 数学関数提供
BigDecimal: 任意桁小数生成用(javaのそれと同じ)
BigDecimal.RoundingMode: 上の丸め動作指定用(javaのそれと同じ)
BigInt: 任意桁整数生成用(javaのBigIntegerと同じ)
Cell: セル(任意のインスタンス保護房(一時的定数化); ".elem"でのみアクセス可)生成用
Function: 高階関数用ツール提供
RandomAccessSeq: 内部用?
Responder: Responder(継続用クラス)用ツール提供
クラス&トレイト(継承ツリー)
c=class、t=trait
p=protected、f=final、a=abstract、s=sealed、(もう一つの)c=case
ケースクラスは"new"無しでインスタンス生成可
- Any(ac):
- Nothing(ft, Any): 最下位クラス
- AnyVal(sfc, Any):
- Boolean(afc, AnyVal):
- Byte(afc, AnyVal):
- Short(afc, AnyVal):
- Int(afc, AnyVal):
- Long(afc, AnyVal):
- Float(afc, AnyVal):
- Double(afc, AnyVal):
- Char(afc, AnyVal):
- Unit(afc, AnyVal):
- AnyRef(c, Any):
- Null(ft, AnyRef):
- ScalaObject(t, AnyRef):
- NotNull(t, AnyRef):
- Application(t, AnyRef):
- ByNameFunction(t, AnyRef):
- PartiallyOrdered(t, AnyRef):
- Symbol(fc, AnyRef):
- Responder(ac, AnyRef):
- Enumeration(ac, AnyRef):
- Random(c, AnyRef):
- Predef.ArrowAssoc(c, AnyRef):
- Predef.Ensuring(c, AnyRef):
- BigDecimal(c, (java.lang.)Number, AnyRef):
- BigInt(c, (java.lang.)Number, AnyRef):
- MatchError(fc, (java.lang.)RuntimeException, AnyRef):
- UninitializedError(fc, (java.lang.)RuntimeException, AnyRef):
- NotDefinedError(fc, (java.lang.)Error, AnyRef):
- Iterator(t, AnyRef):
- CountedIterator(t, Iterator[A]):
- Equiv(t, AnyRef):
- PartialOrdering(t, Equiv[T], AnyRef):
- Ordering(t, PartialOrdering[T]):
- Ordered(t, AnyRef):
- Enumeration.Value(ac, Ordered[Enumeration.Value]):
- Enumeration.Val(pc, Enumeration.Value):
- Enumeration.SetXX(ac, scala.collection.immutable.Set[Enumeration.Value]):
- Enumeration.Set32(c, Enumeration.SetXX):
- Enumeration.Set64(c, Enumeration.SetXX):
- Product(t, AnyRef):
- Product~(t, Product):
- Tuple~(cc, Product~[T~]):
- Option(sac, Product):
- Cell(cc, Product):
- Either.RightProjection(cfc, Product):
- Either.LeftProjection(cfc, Product):
- Either(sac, AnyRef):
- Right(cfc, Either[A, B], Product):
- Left(cfc, Either[A, B], Product):
- Proxy(t, AnyRef):
- Iterable(t, AnyRef):
- IterableProxy(t, Iterable[A], Proxy):
- Iterable.Projection(t, Iterable[A]):
- Collection(t, Iterable[A]):
- CollectionProxy(t, Collection[A], IterableProxy[A]):
- BufferedIterator(t, Iterator[A]):
- BufferedIterator.Advanced(t, BufferedIterator[A]):
- BufferedIterator.PutBack(t, BufferedIterator.AdVanced[A]):
- BufferedIterator.Default(ac, BufferedIterator.PutBack[A]):
- Iterator.PredicatedIterator(pc, BufferedIterator.Default[A]):
- Iterator.TakeWhileIterator(pc, Iterator.PredicatedIterator):
- Function~(t, AnyRef):
- StringBuilder(fc, (Int)=>Char, Proxy):
- PartialFunction(t, (A)=>B):
- Seq(t, PartialFunction[Int, A], Collection[A]):
- SeqProxy(t, Seq[A], IterableProxy[A]):
- List(sac, Seq[A]):
- ::(cfc, List[B], Product):
- RandomAccessSeq(t, Seq[A]):
- Seq.singleton(cc, RandomAccessSeq[A], Product):
- RandomAccessSeq.Mutable(t, RandomAccessSeq[A]):
- Array.ArrayLike(t, Mutable[A]):
- Array.Array0(t, ArrayLike[A]):
- Seq.Projection(t, Seq[A], Iterable.Projection[A]):
- Seq.Projection.ComputeSize(pac, Seq.Projection[B]):
- Stream(t, Seq.Projection[A]):
- Stream.Definite(t, Stream[A], ()=>Stream[A]):
- RandomAccessSeq.Projection(t, Seq.Projection[A], RandomAccessSeq[A]):
- Range(c, RandomAccessSeq.Projection[Int]):
- Range.Inclusive(c, Range):
- RandomAccessSeq.MutableProjection(t, RandomAccessSeq.Projection[A], RandomAccessSeq.Mutable[A]):
- Array.Projection(t, RandomAccessSeq.MutableProjection[A], Array.ArrayLike[A]):
- Seq.Projection.MapProjection(pc, Seq.Projection[B]):
- RandomAccessSeq.Projection.MapProjection(pc, Seq.Projection.MapProjection[B], RandomAccessSeq.Projection[B]):
- Attribute(ac, AnyRef):
- ClassfileAttribute(t, Attribute):
- StaticAttribute(t, Attribute):
- Annotation(ac, AnyRef):
- cloneable(c, Annotation):
- native(c, Annotation):
- remote(c, Annotation):
- serializable(c, Annotation):
- throws(c, Annotation):
- transient(c, Annotation):
- unchecked(c, Annotation):
- unsealed(c, Annotation):
- volatile(c, Annotation):
- SerialVersionUID(c, Annotation):
- TypeConstraint(t, Annotation):
- ClassfileAnnotation(t, Annotation):
- StaticAnnotation(t, Annotation):
- deprecated(c, Annotation.StaticAnnotation):
- inline(c, Annotation.StaticAnnotation):
- noinline(c, Annotation.StaticAnnotation):