ExtSetMethods

scala.collection.ExtSetMethods
trait ExtSetMethods[A] extends FilterableSet[A]

Attributes

Graph
Supertypes
trait FilterableSet[A]
class Object
trait Matchable
class Any
Known subtypes
Self type
Set[A]

Members list

Value members

Abstract methods

def draw(random: Random): A

Returns a random element of the set if it is nonEmpty otherwise throws IllegalArgumentException. Note that currently a near- but no true-uniform distribution is granted to allow for O(1) implementation.

Returns a random element of the set if it is nonEmpty otherwise throws IllegalArgumentException. Note that currently a near- but no true-uniform distribution is granted to allow for O(1) implementation.

Value parameters

random

a random generator; it is essential that random be instantiated by the caller just once for any sequence of calls

Attributes

def findElem[B](toMatch: B, correspond: (A, B) => Boolean): A

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.

Value parameters

correspond

function returning whether a given entry corresponds to other

toMatch

a value not necessarily of type A; the entry to be searched for must have the same hashCode and be equal to this argument

Attributes

Returns

the entry corresponding to toMatch or null if not contained

Concrete methods

def findElem(elem: A): Option[A]

Inherited methods

def withSetFilter(p: A => Boolean): Set[A] & FilterableSet[A]

Attributes

Inherited from:
FilterableSet