sealed abstract class UIDSet[T <: UID] extends Set[T] with StrictOptimizedSetOps[T, Set, UIDSet[T]]
An unordered trie-set based on the unique ids of the stored UID objects. I.e., equality of two sets is defined in terms of the unique ids and not in terms of structural or reference equality of the stored elements.
Implementation
This trie set uses the least significant bit to decide whether the search is continued in the right or left branch.
Small sets are represented using a UIDSet0...3.
Compared to Scala's Set
implementations in particular the tail and filter methods are much
faster.
- Self Type
- UIDSet[T]
- Source
- UIDSet.scala
- Alphabetic
- By Inheritance
- UIDSet
- StrictOptimizedSetOps
- StrictOptimizedSetOps
- StrictOptimizedIterableOps
- Set
- SetOps
- Set
- Equals
- SetOps
- Function1
- Iterable
- Iterable
- IterableFactoryDefaults
- IterableOps
- IterableOnceOps
- IterableOnce
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Abstract Value Members
- abstract def ++(es: UIDSet[T]): UIDSet[T]
- abstract def containsId(id: Int): Boolean
- abstract def excl(e: T): UIDSet[T]
- Definition Classes
- UIDSet → SetOps
- abstract def findById(id: Int): Option[T]
- abstract def idIterator: IntIterator
Iterator over all ids.
- abstract def idSet: IntTrieSet
- abstract def incl(e: T): UIDSet[T]
- Definition Classes
- UIDSet → SetOps
- abstract def isSingletonSet: Boolean
- abstract def iterator: Iterator[T]
- Definition Classes
- UIDSet → IterableOnce
Concrete Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def &(that: Set[T]): UIDSet[T]
- Definition Classes
- SetOps
- Annotations
- @inline()
- final def &~(that: Set[T]): UIDSet[T]
- Definition Classes
- SetOps
- Annotations
- @inline()
- final def +(elem: T): UIDSet[T]
- Definition Classes
- SetOps → SetOps
- final def ++(that: IterableOnce[T]): UIDSet[T]
- Definition Classes
- SetOps
- Annotations
- @inline()
- final def ++[B >: T](suffix: IterableOnce[B]): Set[B]
- Definition Classes
- IterableOps
- Annotations
- @inline()
- final def -(elem: T): UIDSet[T]
- Definition Classes
- SetOps → SetOps
- Annotations
- @inline()
- final def --(that: IterableOnce[T]): UIDSet[T]
- Definition Classes
- SetOps → SetOps
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def add[X >: T <: UID](e: X): UIDSet[X]
- final def addString(b: StringBuilder): b.type
- Definition Classes
- IterableOnceOps
- Annotations
- @inline()
- final def addString(b: StringBuilder, sep: String): b.type
- Definition Classes
- IterableOnceOps
- Annotations
- @inline()
- def addString(b: StringBuilder, start: String, sep: String, end: String): b.type
- Definition Classes
- IterableOnceOps
- def andThen[A](g: (Boolean) => A): (T) => A
- Definition Classes
- Function1
- Annotations
- @unspecialized()
- final def apply(elem: T): Boolean
- Definition Classes
- SetOps → Function1
- Annotations
- @inline()
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def canEqual(that: Any): Boolean
- Definition Classes
- Set → Equals
- def className: String
- Attributes
- protected[this]
- Definition Classes
- Iterable
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native() @IntrinsicCandidate()
- final def coll: UIDSet.this.type
- Attributes
- protected
- Definition Classes
- Iterable → IterableOps
- def collect[B](pf: PartialFunction[T, B]): Set[B]
- Definition Classes
- StrictOptimizedIterableOps → IterableOps → IterableOnceOps
- def collectFirst[B](pf: PartialFunction[T, B]): Option[B]
- Definition Classes
- IterableOnceOps
- def compare(that: UIDSet[T]): SetRelation
Performs a qualified comparison of this set with the given set.
- def compose[A](g: (A) => T): (A) => Boolean
- Definition Classes
- Function1
- Annotations
- @unspecialized()
- def concat(that: IterableOnce[T]): UIDSet[T]
- Definition Classes
- StrictOptimizedSetOps → StrictOptimizedSetOps → SetOps
- def concat[B >: T](suffix: IterableOnce[B]): Set[B]
- Definition Classes
- IterableOps
- final def contains(e: T): Boolean
- Definition Classes
- UIDSet → SetOps
- def copyToArray[B >: T](xs: Array[B], start: Int, len: Int): Int
- Definition Classes
- IterableOnceOps
- def copyToArray[B >: T](xs: Array[B], start: Int): Int
- Definition Classes
- IterableOnceOps
- Annotations
- @deprecatedOverriding()
- def copyToArray[B >: T](xs: Array[B]): Int
- Definition Classes
- IterableOnceOps
- Annotations
- @deprecatedOverriding()
- def corresponds[B](that: IterableOnce[B])(p: (T, B) => Boolean): Boolean
- Definition Classes
- IterableOnceOps
- def count(p: (T) => Boolean): Int
- Definition Classes
- IterableOnceOps
- def diff(that: Set[T]): UIDSet[T]
- Definition Classes
- SetOps → SetOps
- def drop(n: Int): UIDSet[T]
- Definition Classes
- IterableOps → IterableOnceOps
- def dropRight(n: Int): UIDSet[T]
- Definition Classes
- StrictOptimizedIterableOps → IterableOps
- def dropWhile(p: (T) => Boolean): UIDSet[T]
- Definition Classes
- IterableOps → IterableOnceOps
- final def empty: UIDSet[T]
- Definition Classes
- UIDSet → IterableFactoryDefaults → IterableOps
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(that: Any): Boolean
- Definition Classes
- Set → Equals → AnyRef → Any
- def exists(p: (T) => Boolean): Boolean
- Definition Classes
- IterableOnceOps
- def filter(pred: (T) => Boolean): UIDSet[T]
- Definition Classes
- StrictOptimizedIterableOps → IterableOps → IterableOnceOps
- def filterImpl(pred: (T) => Boolean, isFlipped: Boolean): UIDSet[T]
- Attributes
- protected[scala.collection]
- Definition Classes
- StrictOptimizedIterableOps
- def filterNot(pred: (T) => Boolean): UIDSet[T]
- Definition Classes
- StrictOptimizedIterableOps → IterableOps → IterableOnceOps
- def find(p: (T) => Boolean): Option[T]
- Definition Classes
- IterableOnceOps
- def flatMap[B](f: (T) => IterableOnce[B]): Set[B]
- Definition Classes
- StrictOptimizedIterableOps → IterableOps → IterableOnceOps
- def flatten[B](implicit toIterableOnce: (T) => IterableOnce[B]): Set[B]
- Definition Classes
- StrictOptimizedIterableOps → IterableOps → IterableOnceOps
- def fold[A1 >: T](z: A1)(op: (A1, A1) => A1): A1
- Definition Classes
- IterableOnceOps
- def foldLeft[B](z: B)(op: (B, T) => B): B
- Definition Classes
- IterableOnceOps
- def foldRight[B](z: B)(op: (T, B) => B): B
- Definition Classes
- IterableOnceOps
- def forall(p: (T) => Boolean): Boolean
- Definition Classes
- IterableOnceOps
- def foreach[U](f: (T) => U): Unit
- Definition Classes
- IterableOnceOps
- def foreachIterator: ForeachRefIterator[T]
- def fromSpecific(coll: IterableOnce[T]): UIDSet[T]
- Definition Classes
- UIDSet → IterableFactoryDefaults → IterableOps
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @IntrinsicCandidate()
- def groupBy[K](f: (T) => K): Map[K, UIDSet[T]]
- Definition Classes
- IterableOps
- def groupMap[K, B](key: (T) => K)(f: (T) => B): Map[K, Set[B]]
- Definition Classes
- IterableOps
- def groupMapReduce[K, B](key: (T) => K)(f: (T) => B)(reduce: (B, B) => B): Map[K, B]
- Definition Classes
- IterableOps
- def grouped(size: Int): Iterator[UIDSet[T]]
- Definition Classes
- IterableOps
- def hashCode(): Int
- Definition Classes
- Set → AnyRef → Any
- def head: T
- Definition Classes
- IterableOps
- def headOption: Option[T]
- Definition Classes
- IterableOps
- final def includes[X >: T <: UID](e: X): Boolean
- def init: UIDSet[T]
- Definition Classes
- IterableOps
- def inits: Iterator[UIDSet[T]]
- Definition Classes
- IterableOps
- def intersect(that: Set[T]): UIDSet[T]
- Definition Classes
- SetOps
- def isEmpty: Boolean
- Definition Classes
- IterableOnceOps
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def isTraversableAgain: Boolean
- Definition Classes
- IterableOps → IterableOnceOps
- def iterableFactory: IterableFactory[Set]
- Definition Classes
- Set → Set → Iterable → Iterable → IterableOps
- def knownSize: Int
- Definition Classes
- IterableOnce
- def last: T
- Definition Classes
- IterableOps
- def lastOption: Option[T]
- Definition Classes
- IterableOps
- def lazyZip[B](that: Iterable[B]): LazyZip2[T, B, UIDSet.this.type]
- Definition Classes
- Iterable
- def map[B](f: (T) => B): Set[B]
- Definition Classes
- StrictOptimizedIterableOps → IterableOps → IterableOnceOps
- def mapUIDSet[B <: UID](f: (T) => B): UIDSet[B]
- def max[B >: T](implicit ord: Ordering[B]): T
- Definition Classes
- IterableOnceOps
- def maxBy[B](f: (T) => B)(implicit cmp: Ordering[B]): T
- Definition Classes
- IterableOnceOps
- def maxByOption[B](f: (T) => B)(implicit cmp: Ordering[B]): Option[T]
- Definition Classes
- IterableOnceOps
- def maxOption[B >: T](implicit ord: Ordering[B]): Option[T]
- Definition Classes
- IterableOnceOps
- def min[B >: T](implicit ord: Ordering[B]): T
- Definition Classes
- IterableOnceOps
- def minBy[B](f: (T) => B)(implicit cmp: Ordering[B]): T
- Definition Classes
- IterableOnceOps
- def minByOption[B](f: (T) => B)(implicit cmp: Ordering[B]): Option[T]
- Definition Classes
- IterableOnceOps
- def minOption[B >: T](implicit ord: Ordering[B]): Option[T]
- Definition Classes
- IterableOnceOps
- final def mkString: String
- Definition Classes
- IterableOnceOps
- Annotations
- @inline()
- final def mkString(sep: String): String
- Definition Classes
- IterableOnceOps
- Annotations
- @inline()
- final def mkString(start: String, sep: String, end: String): String
- Definition Classes
- IterableOnceOps
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def newSpecificBuilder: Builder[T, UIDSet[T]]
- Definition Classes
- UIDSet → IterableFactoryDefaults → IterableOps
- def nonEmpty: Boolean
- Definition Classes
- IterableOnceOps
- Annotations
- @deprecatedOverriding()
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @IntrinsicCandidate()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @IntrinsicCandidate()
- def partition(p: (T) => Boolean): (UIDSet[T], UIDSet[T])
- Definition Classes
- StrictOptimizedIterableOps → IterableOps
- def partitionMap[A1, A2](f: (T) => Either[A1, A2]): (Set[A1], Set[A2])
- Definition Classes
- StrictOptimizedIterableOps → IterableOps
- def product[B >: T](implicit num: Numeric[B]): B
- Definition Classes
- IterableOnceOps
- def reduce[B >: T](op: (B, B) => B): B
- Definition Classes
- IterableOnceOps
- def reduceLeft[B >: T](op: (B, T) => B): B
- Definition Classes
- IterableOnceOps
- def reduceLeftOption[B >: T](op: (B, T) => B): Option[B]
- Definition Classes
- IterableOnceOps
- def reduceOption[B >: T](op: (B, B) => B): Option[B]
- Definition Classes
- IterableOnceOps
- def reduceRight[B >: T](op: (T, B) => B): B
- Definition Classes
- IterableOnceOps
- def reduceRightOption[B >: T](op: (T, B) => B): Option[B]
- Definition Classes
- IterableOnceOps
- def removedAll(that: IterableOnce[T]): UIDSet[T]
- Definition Classes
- SetOps
- def reversed: Iterable[T]
- Attributes
- protected
- Definition Classes
- IterableOnceOps
- def scan[B >: T](z: B)(op: (B, B) => B): Set[B]
- Definition Classes
- IterableOps
- def scanLeft[B](z: B)(op: (B, T) => B): Set[B]
- Definition Classes
- StrictOptimizedIterableOps → IterableOps → IterableOnceOps
- def scanRight[B](z: B)(op: (T, B) => B): Set[B]
- Definition Classes
- IterableOps
- def size: Int
- Definition Classes
- IterableOnceOps
- def sizeCompare(that: Iterable[_]): Int
- Definition Classes
- IterableOps
- def sizeCompare(otherSize: Int): Int
- Definition Classes
- IterableOps
- final def sizeIs: SizeCompareOps
- Definition Classes
- IterableOps
- Annotations
- @inline()
- def slice(from: Int, until: Int): UIDSet[T]
- Definition Classes
- IterableOps → IterableOnceOps
- def sliding(size: Int, step: Int): Iterator[UIDSet[T]]
- Definition Classes
- IterableOps
- def sliding(size: Int): Iterator[UIDSet[T]]
- Definition Classes
- IterableOps
- def span(p: (T) => Boolean): (UIDSet[T], UIDSet[T])
- Definition Classes
- StrictOptimizedIterableOps → IterableOps → IterableOnceOps
- def splitAt(n: Int): (UIDSet[T], UIDSet[T])
- Definition Classes
- IterableOps → IterableOnceOps
- def stepper[S <: Stepper[_]](implicit shape: StepperShape[T, S]): S
- Definition Classes
- IterableOnce
- final def strictOptimizedCollect[B, C2](b: Builder[B, C2], pf: PartialFunction[T, B]): C2
- Attributes
- protected[this]
- Definition Classes
- StrictOptimizedIterableOps
- Annotations
- @inline()
- final def strictOptimizedConcat[B >: T, C2](that: IterableOnce[B], b: Builder[B, C2]): C2
- Attributes
- protected[this]
- Definition Classes
- StrictOptimizedIterableOps
- Annotations
- @inline()
- final def strictOptimizedFlatMap[B, C2](b: Builder[B, C2], f: (T) => IterableOnce[B]): C2
- Attributes
- protected[this]
- Definition Classes
- StrictOptimizedIterableOps
- Annotations
- @inline()
- final def strictOptimizedFlatten[B, C2](b: Builder[B, C2])(implicit toIterableOnce: (T) => IterableOnce[B]): C2
- Attributes
- protected[this]
- Definition Classes
- StrictOptimizedIterableOps
- Annotations
- @inline()
- final def strictOptimizedMap[B, C2](b: Builder[B, C2], f: (T) => B): C2
- Attributes
- protected[this]
- Definition Classes
- StrictOptimizedIterableOps
- Annotations
- @inline()
- final def strictOptimizedZip[B, C2](that: IterableOnce[B], b: Builder[(T, B), C2]): C2
- Attributes
- protected[this]
- Definition Classes
- StrictOptimizedIterableOps
- Annotations
- @inline()
- def stringPrefix: String
- Attributes
- protected[this]
- Definition Classes
- Set → Iterable
- def subsetOf(that: Set[T]): Boolean
- Definition Classes
- SetOps
- def subsets(): Iterator[UIDSet[T]]
- Definition Classes
- SetOps
- def subsets(len: Int): Iterator[UIDSet[T]]
- Definition Classes
- SetOps
- def sum[B >: T](implicit num: Numeric[B]): B
- Definition Classes
- IterableOnceOps
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def tail: UIDSet[T]
- Definition Classes
- UIDSet → IterableOps
- def tails: Iterator[UIDSet[T]]
- Definition Classes
- IterableOps
- def take(n: Int): UIDSet[T]
- Definition Classes
- IterableOps → IterableOnceOps
- def takeRight(n: Int): UIDSet[T]
- Definition Classes
- StrictOptimizedIterableOps → IterableOps
- def takeWhile(p: (T) => Boolean): UIDSet[T]
- Definition Classes
- IterableOps → IterableOnceOps
- def tapEach[U](f: (T) => U): UIDSet[T]
- Definition Classes
- StrictOptimizedIterableOps → IterableOps → IterableOnceOps
- def to[C1](factory: Factory[T, C1]): C1
- Definition Classes
- IterableOnceOps
- def toArray[B >: T](implicit arg0: ClassTag[B]): Array[B]
- Definition Classes
- IterableOnceOps
- def toArraySeq(implicit classTag: ClassTag[T]): ArraySeq[T]
- final def toBuffer[B >: T]: Buffer[B]
- Definition Classes
- IterableOnceOps
- Annotations
- @inline()
- def toIndexedSeq: IndexedSeq[T]
- Definition Classes
- IterableOnceOps
- def toList: List[T]
- Definition Classes
- IterableOnceOps
- def toMap[K, V](implicit ev: <:<[T, (K, V)]): Map[K, V]
- Definition Classes
- IterableOnceOps
- def toSeq: Seq[T]
- Definition Classes
- IterableOnceOps
- def toSet[B >: T]: Set[B]
- Definition Classes
- IterableOnceOps
- def toString(): String
- Definition Classes
- Set → Function1 → Iterable → AnyRef → Any
- final def toUIDSet[X >: T <: UID]: UIDSet[X]
- def toVector: Vector[T]
- Definition Classes
- IterableOnceOps
- def transpose[B](implicit asIterable: (T) => Iterable[B]): Set[Set[B]]
- Definition Classes
- IterableOps
- final def union(that: Set[T]): UIDSet[T]
- Definition Classes
- SetOps
- Annotations
- @inline()
- def unzip[A1, A2](implicit asPair: (T) => (A1, A2)): (Set[A1], Set[A2])
- Definition Classes
- StrictOptimizedIterableOps → IterableOps
- def unzip3[A1, A2, A3](implicit asTriple: (T) => (A1, A2, A3)): (Set[A1], Set[A2], Set[A3])
- Definition Classes
- StrictOptimizedIterableOps → IterableOps
- def view: View[T]
- Definition Classes
- IterableOps
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- def withFilter(p: (T) => Boolean): WithFilter[T, [_]Set[_]]
- Definition Classes
- IterableOps
- def zip[B](that: IterableOnce[B]): Set[(T, B)]
- Definition Classes
- StrictOptimizedIterableOps → IterableOps
- def zipAll[A1 >: T, B](that: Iterable[B], thisElem: A1, thatElem: B): Set[(A1, B)]
- Definition Classes
- IterableOps
- def zipWithIndex: Set[(T, Int)]
- Definition Classes
- StrictOptimizedIterableOps → IterableOps → IterableOnceOps
- final def |(that: Set[T]): UIDSet[T]
- Definition Classes
- SetOps
- Annotations
- @inline()
Deprecated Value Members
- def +(elem1: T, elem2: T, elems: T*): UIDSet[T]
- Definition Classes
- SetOps
- Annotations
- @deprecated
- Deprecated
(Since version 2.13.0) Use ++ with an explicit collection argument instead of + with varargs
- def ++:[B >: T](that: IterableOnce[B]): Set[B]
- Definition Classes
- IterableOps
- Annotations
- @deprecated
- Deprecated
(Since version 2.13.0) Use ++ instead of ++: for collections of type Iterable
- def -(elem1: T, elem2: T, elems: T*): UIDSet[T]
- Definition Classes
- SetOps
- Annotations
- @deprecated
- Deprecated
(Since version 2.13.0) Use &- with an explicit collection argument instead of - with varargs
- final def /:[B](z: B)(op: (B, T) => B): B
- Definition Classes
- IterableOnceOps
- Annotations
- @deprecated @inline()
- Deprecated
(Since version 2.13.0) Use foldLeft instead of /:
- final def :\[B](z: B)(op: (T, B) => B): B
- Definition Classes
- IterableOnceOps
- Annotations
- @deprecated @inline()
- Deprecated
(Since version 2.13.0) Use foldRight instead of :\
- def aggregate[B](z: => B)(seqop: (B, T) => B, combop: (B, B) => B): B
- Definition Classes
- IterableOnceOps
- Annotations
- @deprecated
- Deprecated
(Since version 2.13.0)
aggregate
is not relevant for sequential collections. UsefoldLeft(z)(seqop)
instead.
- def companion: IterableFactory[[_]Set[_]]
- Definition Classes
- IterableOps
- Annotations
- @deprecated @deprecatedOverriding() @inline()
- Deprecated
(Since version 2.13.0) Use iterableFactory instead
- final def copyToBuffer[B >: T](dest: Buffer[B]): Unit
- Definition Classes
- IterableOnceOps
- Annotations
- @deprecated @inline()
- Deprecated
(Since version 2.13.0) Use
dest ++= coll
instead
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable]) @Deprecated
- Deprecated
- def hasDefiniteSize: Boolean
- Definition Classes
- IterableOnceOps
- Annotations
- @deprecated
- Deprecated
(Since version 2.13.0) Check .knownSize instead of .hasDefiniteSize for more actionable information (see scaladoc for details)
- final def repr: UIDSet[T]
- Definition Classes
- IterableOps
- Annotations
- @deprecated
- Deprecated
(Since version 2.13.0) Use coll instead of repr in a collection implementation, use the collection value itself from the outside
- def seq: UIDSet.this.type
- Definition Classes
- Iterable
- Annotations
- @deprecated
- Deprecated
(Since version 2.13.0) Iterable.seq always returns the iterable itself
- final def toIterable: UIDSet.this.type
- Definition Classes
- Iterable → IterableOps
- Annotations
- @deprecated
- Deprecated
(Since version 2.13.7) toIterable is internal and will be made protected; its name is similar to
toList
ortoSeq
, but it doesn't copy non-immutable collections
- final def toIterator: Iterator[T]
- Definition Classes
- IterableOnceOps
- Annotations
- @deprecated @inline()
- Deprecated
(Since version 2.13.0) Use .iterator instead of .toIterator
- final def toStream: Stream[T]
- Definition Classes
- IterableOnceOps
- Annotations
- @deprecated @inline()
- Deprecated
(Since version 2.13.0) Use .to(LazyList) instead of .toStream
- final def toTraversable: Traversable[T]
- Definition Classes
- IterableOps
- Annotations
- @deprecated
- Deprecated
(Since version 2.13.0) toTraversable is internal and will be made protected; its name is similar to
toList
ortoSeq
, but it doesn't copy non-immutable collections
- def view(from: Int, until: Int): View[T]
- Definition Classes
- IterableOps
- Annotations
- @deprecated
- Deprecated
(Since version 2.13.0) Use .view.slice(from, until) instead of .view(from, until)