BigData-Notes/notes/Scala其他集合类型.md
2019-05-07 17:51:32 +08:00

11 lines
531 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

其他集合类型
一、集合综述
在前面的文章中,主要介绍了四种常用的集合(List、Set、Map、Tuple)实际上Scala中还有各种集合类型。Scala中集合分为可变的和不可变的集合。
+ 可变集合: 可以被修改。即可以更改,添加,删除集合中的元素;
+ 不可变集合类:不能被修改。虽然可以对不可变集合执行添加,移除或更新操作,但是这些操作都会返回一个新的集合,而不是修改原来的集合。
二、集合包