Optimization hints controlling the growth of the underlying scala.collection.mutable.ArrayBuffer!.
(Changed in version 2.8.0) +
creates a new set. Use +=
to add an element to this set and return that set itself.
(Changed in version 2.8.0) +
creates a new set. Use +=
to add an element to this set and return that set itself.
(Changed in version 2.8.0) ++
creates a new set. Use ++=
to add elements to this set and return that set itself.
Adds elem
without checking for duplicates.
Adds elem
without checking for duplicates.
(Changed in version 2.8.0) -
creates a new set. Use -=
to remove an element from this set and return that set itself.
(Changed in version 2.8.0) -
creates a new set. Use -=
to remove an element from this set and return that set itself.
(Changed in version 2.8.0) --
creates a new set. Use --=
to remove elements from this set and return that set itself.
For isArray == true
, the current capacity of the internal array else 0.
For isArray == true
, the current capacity of the internal array else 0.
Compacts the current representation depending on ArraySet.Hints.compactUpToUsed.
Compacts the current representation depending on ArraySet.Hints.compactUpToUsed.
Returns a random element of the set if it is nonEmpty
otherwise throws
IllegalArgumentException
.
Returns a random element of the set if it is nonEmpty
otherwise throws
IllegalArgumentException
.
a random generator; it is essential that random
be instantiated
by the caller just once for any sequence of calls
Optimized by use of unchecked insertions.
Optimized by use of unchecked insertions.
Finds an entry in the collection based on toMatch
's hashCode
and a correspondence
function but not on the argument type.
Finds an entry in the collection based on toMatch
's hashCode
and a correspondence
function but not on the argument type.
function returning whether a given entry corresponds to other
the entry corresponding to toMatch
or null if not contained
Optimization hints controlling the growth of the underlying scala.collection.mutable.ArrayBuffer!.
Optimization hints controlling the growth of the underlying scala.collection.mutable.ArrayBuffer!.
Whether the internal representation is currently based on Array
.
Whether the internal representation is currently based on Array
.
(Changed in version 2.8.0) Set.map now returns a Set, so it will discard duplicate values.
Faster mapping in case the caller ensures to insert no duplicates.
Faster mapping in case the caller ensures to insert no duplicates.
Optimized by use of unchecked insertions.
Optimized by use of unchecked insertions.
(Changed in version 2.9.0) The behavior of scanRight
has changed. The previous behavior can be reproduced with scanRight.reverse.
Sorts this ArraySet
according to the Ordering which results from transforming
an implicitly given Ordering with a transformation function in place.
Sorts this ArraySet
according to the Ordering which results from transforming
an implicitly given Ordering with a transformation function in place.
scala.collection.SeqLike
Sorts this ArraySet
according to a comparison function in place.
Sorts this ArraySet
according to a comparison function in place.
scala.collection.SeqLike
Sorts this ArraySet
according to an Ordering in place.
Sorts this ArraySet
according to an Ordering in place.
scala.collection.SeqLike
(Changed in version 2.9.0) transpose
throws an IllegalArgumentException
if collections are not uniformly sized.
Updates or inserts elem
.
Updates or inserts elem
.
true
if an insert took place.
Returns a lazily filtered immutable Set.
Returns a lazily filtered immutable Set.
A basic ArraySet implementation suitable for efficient add operations. Element removal could be optimized by another implementation.