package immutable
- Alphabetic
- Public
- All
Type Members
-
final
case class
:&:[T](head: T, rest: Chain[T] = Naught) extends Chain[T] with Product with Serializable
An container for a list element.
-
sealed abstract
class
BitArraySet extends BitSet
An immutable bit set for storing positive int values.
An immutable bit set for storing positive int values. An array is used to store the underlying values. The empty bit set and sets where the maximum value is 64 use optimized representations.
-
sealed
trait
Chain[+T] extends TraversableOnce[T] with FilterMonadic[T, Chain[T]] with Serializable
A linked list which does not perform any length related checks.
A linked list which does not perform any length related checks. I.e., it fails in case of
dropandtakeetc. if the size of the list is smaller than expected. Furthermore, all directly implemented methods usewhileloops for maximum efficiency and the list is also specialized for primitiveintvalues which makes this list far more efficient when used for storing lists ofintvalues.- Note
In most cases a
,Chaincan be used as a drop-in replacement for a standard Scala List.Some core methods, e.g.
dropandtake, have different semantics when compared to the methods with the same name defined by the Scala collections API. In this case these methods may fail arbitrarily if the list is not long enough. Therefore,Chaindoes not inherit fromscala...Seq.
-
final
class
ConstArray[T <: AnyRef] extends IndexedSeq[T] with IndexedSeqOptimized[T, ConstArray[T]]
Wraps an array such that the underlying array is no longer directly accessible and therefore also no longer mutable if
ConstArrayis the sole owner. -
final
class
ConstCovariantArray[+T <: AnyRef] extends AnyRef
Wraps an array such that the underlying array is no longer directly accessible and therefore also no longer mutable if
ConstCovariantArrayis the sole owner. - final class FilteredIntTrieSet extends IntTrieSet
- final class FilteredLongTrieSet extends LongTrieSet
-
final
case class
IdentityPair[+T1 <: AnyRef, +T2 <: AnyRef](_1: T1, _2: T2) extends Product2[T1, T2] with Product with Serializable
Encapsulates a pair of values that is intended to be used as a key in Maps.
Encapsulates a pair of values that is intended to be used as a key in Maps. Compared to a standard pair (Tuple2), however, comparison of two
IdentityPairobjects is done by doing a reference-based comparison of the stored values.- _1
A reference value (can be
null).- _2
A reference value (can be
null).
val a = new String("fooBar") val b = "foo"+"Bar" val p1 = new IdentityPair(a,b) // #1 val p2 = new IdentityPair(a,a) // #2 val p3 = new IdentityPair(a,b) // #3 p1 == p2 // => false (though (a,b) == (a,a) would be true p1 == p3 // => true
Example: -
class
IntArray extends Seq[Int]
Wraps an array such that the underlying array is no longer directly accessible and therefore also no longer mutable.
-
sealed abstract
class
IntArraySet extends (Int) ⇒ Int with IntSet[IntArraySet] with IntCollectionWithStableOrdering[IntArraySet]
A sorted set of integer values backed by an ordered array to store the values; this guarantees log2(n) lookup.
- case class IntArraySet1(i: Int) extends IntArraySet with Product with Serializable
- class IntArraySetBuilder extends Builder[Int, IntArraySet]
- case class IntArraySetN extends IntArraySet with Product with Serializable
-
final
case class
IntIntPair(_1: Int, _2: Int) extends Product with Serializable
An immutable pair of int values.
-
case class
IntRefPair[+T](_1: Int, _2: T) extends Product2[Int, T] with Product with Serializable
A simple pairing of an int value and a reference value.
A simple pairing of an int value and a reference value.
- T
The type of the reference value.
- _1
The first value.
- _2
The second value.
-
sealed abstract
class
IntTrieSet extends IntSet[IntTrieSet] with IntCollectionWithStableOrdering[IntTrieSet] with IntWorkSet[IntTrieSet]
An unordered set of integer values backed by a trie set.
An unordered set of integer values backed by a trie set. The branching is done using the least significant bit and values are only stored in leaf nodes. This ensure that we have a stable iteration order.
- final case class IntTrieSet1 extends IntTrieSetL with Product with Serializable
- class IntTrieSetBuilder extends Builder[Int, IntTrieSet]
-
trait
IntWorkSet[T <: IntWorkSet[T]] extends AnyRef
A set of integers which supports (reasonable) efficient
headAndTailoperations. -
final
case class
LongRefPair[+T](_1: Long, _2: T) extends Product with Serializable
A simple pairing of a long value and a reference value.
A simple pairing of a long value and a reference value.
- T
The type of the reference value.
- _1
The first value.
- _2
The second value.
-
sealed abstract
class
LongTrieSet extends LongSet[LongTrieSet] with LongCollectionWithStableOrdering[LongTrieSet] with LongWorkSet[LongTrieSet]
An unordered set of long values backed by a trie set.
An unordered set of long values backed by a trie set. The branching is done using the least significant bit and values are only stored in leaf nodes. This ensure that we have a stable iteration order.
- final case class LongTrieSet1 extends LongTrieSetL with Product with Serializable
- class LongTrieSetBuilder extends Builder[Long, LongTrieSet]
-
trait
LongWorkSet[T <: LongWorkSet[T]] extends AnyRef
A set of longs which supports (reasonable) efficient
headAndTailoperations. - sealed abstract class NonEmptyUIDSet[T <: UID] extends UIDSet[T]
-
class
RefArray[+T] extends Seq[T]
Wraps an array such that the underlying array is no longer directly accessible and therefore also no longer mutable if
RefArrayis the sole owner.Wraps an array such that the underlying array is no longer directly accessible and therefore also no longer mutable if
RefArrayis the sole owner.- Note
Compared to
ConstArray,RefArraydoes not provide an efficienttoArraymethod. However,RefArrays are covariant.
-
sealed abstract
class
UIDLinearProbingSet[+T <: UID] extends AnyRef
An unordered set based on the unique ids of the stored UID objects.
-
sealed abstract
class
UIDSet[T <: UID] extends Set[T] with SetLike[T, UIDSet[T]]
An unordered trie-set based on the unique ids of the stored UID objects.
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
Setimplementations in particular the tail and filter methods are much faster. - final case class UIDSet1[T <: UID](value: T) extends NonEmptyUIDSet[T] with Product with Serializable
- final class UIDSet2[T <: UID] extends NonEmptyUIDSet[T]
- final class UIDSet3[T <: UID] extends NonEmptyUIDSet[T]
- final class UIDTrieSetInnerNode[T <: UID] extends UIDTrieSetNodeLike[T]
- final class UIDTrieSetLeaf[T <: UID] extends UIDTrieSetNodeLike[T]
-
final
class
UShortPair extends AnyVal
A memory-efficient representation of a pair of UShortValues which uses one Integer value.
A memory-efficient representation of a pair of UShortValues which uses one Integer value.
scala> val p = org.opalj.collection.immutable.UShortPair(2323,332) p: org.opalj.collection.immutable.UShortPair = UShortPair(2323,332)
Example:
Value Members
- object BitArraySet
-
object
Chain extends Serializable
Factory for Chains.
-
object
ConstArray
Factory for ConstArrays.
-
object
ConstCovariantArray
Factory for ConstCovariantArrays.
- object EmptyIntArraySet extends IntArraySet with Product with Serializable
- object EmptyIntTrieSet extends IntTrieSetL with Product with Serializable
- object EmptyLongTrieSet extends LongTrieSetL with Product with Serializable
-
object
IntArray
Factory for IntArrays.
- object IntArraySet
- object IntArraySetBuilder
-
object
IntTrieSet
Factory to create IntTrieSets.
- object IntTrieSet1 extends Serializable
-
object
LongTrieSet
Factory to create LongTrieSets.
- object LongTrieSet1 extends Serializable
-
object
Naught extends Chain[Nothing] with Product with Serializable
An empty Chains.
- object Pair
-
object
RefArray
Factory for RefArrays.
- object UIDLinearProbingSet
- object UIDSet
-
object
UIDSet0 extends UIDSet[UID]
Represents the empty UIDSet.
- object UIDSet2
-
object
UShortPair
Factory to create
UShortPairobjects.