EDIT : for someone wondering why this answer seems a little off topic, this is because I (the questionnaire) changed the question.
Scala type inference is good enough to realize that you want CharSequences, not Strings in some situations. In particular, the following works for me in 2.7.3:
import scala.collections.immutable._ def findCharSequences(): Set[CharSequence] = Set("Hello", "World")
How to create immutable. HashSets directly: not necessary. How to optimize the implementation, immutable. HashSets of less than 5 elements are not actually immutable instances. Hashset. This is either EmptySet, Set1, Set2, Set3, or Set4. These subclasses of classes are immutable. Install, but not required. Hashset.
Jorge Ortiz Mar 24 '09 at 10:45 2009-03-24 10:45
source share