tinyscalautils.collection
Members list
Type members
Classlikes
Attributes
- Source
- lists.scala
- Supertypes
- Self type
-
ArrayList.type
Attributes
- Source
- sets.scala
- Supertypes
- Self type
-
HashSet.type
Attributes
- Source
- lists.scala
- Supertypes
- Self type
-
JavaList.type
Attributes
- Companion
- object
- Source
- lists.scala
- Supertypes
- Known subtypes
Attributes
- Companion
- trait
- Source
- lists.scala
- Supertypes
- Self type
-
JavaListFactory.type
Attributes
- Source
- sets.scala
- Supertypes
- Self type
-
JavaSet.type
Attributes
- Companion
- object
- Source
- sets.scala
- Supertypes
- Known subtypes
Attributes
- Companion
- trait
- Source
- sets.scala
- Supertypes
- Self type
-
JavaSetFactory.type
Attributes
- Source
- lists.scala
- Supertypes
- Self type
-
LinkedList.type
Attributes
- Source
- sets.scala
- Supertypes
- Self type
-
TreeSet.type
Extensions
Extensions
Adds a nonEmpty
method on Java collections.
True if all the collection's elements are distinct.
True if all the collection's elements are distinct.
Note that this is true of an empty collection.
Attributes
- Since
-
1.7
- Source
- allDistinct.scala
Picks one element at random.
Picks one element at random.
This should not be used in a loop; use randomly instead.
The collection is assumed non-emtpy.
Attributes
- Throws
-
NoSuchElementException
if the collection is empty.
- Since
-
1.0
- Source
- pickOne.scala
Picks one element at random.
Picks one element at random.
This should not be used in a loop; use randomly instead.
Returns None
if the collection is empty.
Attributes
- Since
-
1.0
- Source
- pickOne.scala
An iterator that produces the elements of a collection in a random (uniform) order.
An iterator that produces the elements of a collection in a random (uniform) order.
If the collection is empty, the iterator is empty; otherwise, it is infinite.
This method iterates over the entire collection and is not thread-safe in general. However, the iterator that is returned relies on its own copy and is thread-safe if the random number generator is thread-safe.
Attributes
- Since
-
1.0
- Source
- randomly.scala
A convenient way to invoke Random.shuffle
in a pipeline.
An iterator that repeats the elements of the iterable in a circular way.
An iterator that repeats the elements of the iterable in a circular way.
For instance,
List(A,B,C).circular
is the infinite iterator A,B,C,A,B,C,A,B,...
.
The iterator is empty if the source is empty.
Attributes
- Since
-
1.0
- Source
- circular.scala
The last element of the collection, if any.
The last element of the collection, if any.
Attributes
- Throws
-
NoSuchElementException
if the collection is empty.
- Since
-
1.5.0
- Source
- last.scala
The last element of the collection, if any.
Sorted according to implicit order, but in reverse.
A new sequence in which element at position i
has been deleted. If i
is not a valid index, no exception is thrown and the sequence is returned unchanged (usually as the same instance).
A new sequence in which element at position i
has been deleted. If i
is not a valid index, no exception is thrown and the sequence is returned unchanged (usually as the same instance).
Attributes
- Since
-
1.5.0
- Source
- deleted.scala
A new sequence in which element at position i
has been replaced with a new value, if any. The new value is computed as f(seq(i))
. If it doesn't produce a replacement value, the element at position i
is simply removed. If i
is not a valid index, no exception is thrown and the sequence is returned unchanged (usually as the same instance).
A new sequence in which element at position i
has been replaced with a new value, if any. The new value is computed as f(seq(i))
. If it doesn't produce a replacement value, the element at position i
is simply removed. If i
is not a valid index, no exception is thrown and the sequence is returned unchanged (usually as the same instance).
Attributes
- Since
-
1.5.0
- Source
- deleted.scala
Deprecated extensions
Attributes
- Deprecated
-
[Since version 1.3]
- Source
- Queue.scala
Attributes
- Deprecated
-
[Since version 1.3]
- Source
- Queue.scala