package mutable
- Alphabetic
- Public
- All
Type Members
-
class
ArrayMap[T >: Null <: AnyRef] extends AnyRef
Conceptually, a map where the (implicit) keys are positive
Intvalues and the values are non-null;nullvalues are not permitted! The key values always have to be larger than or equal to 0 and are ideally continues (0,1,2,3,...).Conceptually, a map where the (implicit) keys are positive
Intvalues and the values are non-null;nullvalues are not permitted! The key values always have to be larger than or equal to 0 and are ideally continues (0,1,2,3,...). The values are stored in a plain array to enable true O(1) retrieval. Furthermore, the array is only as large as it has to be to keep the value associated with the largest key.- Note
This data structure is not thread safe.
-
sealed abstract
class
FixedSizeBitSet extends BitSet with Serializable
A bit set with a given upper bound for the largest value that can be stored in the set.
A bit set with a given upper bound for the largest value that can be stored in the set. The upper bound is only used to create an optimal underlying representation. It has no impact on equals and/or hashcode computations. I.e., two sets with two different upper bounds which contain the same values, are equal and have the same hashcode.
Conceptually, the an array of long values is used to store the values.
If values are added to the set that are larger than the specified size the behavior is undefined!
-
class
FixedSizedHashIDMap[K <: AnyRef, V] extends AnyRef
Conceptually, a map where the keys have to have unique hash codes that are spread over a previously known range.
Conceptually, a map where the keys have to have unique hash codes that are spread over a previously known range.
Hence, Using this map has three requirements:
- The value returned by the hashcode function of the keys have to be unique w.r.t. the values stored in the map; i.e., two different key objects have to have different hashcode values.
- The range of hashcode values returned by the keys has to be known and should be reasonably consecutive because an array will be preallocated to hold all values. (it can nevertheless start with an arbitrary int)
- The number of eventually stored key/values should be > 1/4 of the range of key values to amortize the costs of the underlying data-structures.
- Note
The
,nullkey is not permitted.This data structure is not thread safe.
-
class
IntAppendChain extends AnyRef
A mutable chain (basically a linked-list) that enables o(1) append and prepend operations.
A mutable chain (basically a linked-list) that enables o(1) append and prepend operations. However, only removing the head element is a constant operation!
-
final
class
IntArrayStack extends IndexedSeq[Int] with IndexedSeqLike[Int, IntArrayStack] with Cloneable[IntArrayStack] with Serializable
An array based implementation of a mutable stack of
intvalues which has a given initial size.An array based implementation of a mutable stack of
intvalues which has a given initial size. If the stack is non-empty, the index of the top value is0and the index of the bottom value is (length-1). -
final
class
IntQueue extends Serializable
A lightweight, linked-list based implementation of a mutable queue of int values.
A lightweight, linked-list based implementation of a mutable queue of int values.
- Attributes
- protected[org.opalj]
- Note
This data-structure is only intended to be used by OPAL.
,This data structure is not thread safe.
-
final
class
RefAccumulator[A <: AnyRef] extends AnyRef
A list based accumulator of values and collections of values where the collections of values are not copied to the accumulator but only an iterator of those values.
A list based accumulator of values and collections of values where the collections of values are not copied to the accumulator but only an iterator of those values. Hence, the collections that are added to this accumulator must not be mutated after being added.
- A
A type which is NOT a subtype of
Iterator[_].
- Note
This is not a general purpose data-structure due to the requirements on the immutability of added collections.
-
class
RefAppendChain[N >: Null <: AnyRef] extends AnyRef
A mutable chain (basically a linked-list) that enables o(1) append and prepend operations.
A mutable chain (basically a linked-list) that enables o(1) append and prepend operations. However, only removing the head element is a constant operation!
-
final
class
RefArrayBuffer[N >: Null <: AnyRef] extends AnyRef
An array based implementation of a mutable buffer.
An array based implementation of a mutable buffer. This implementation offers highly optimized, but very unsafe methods and is therefore not a general purpose data-structure. In general, this buffer should only be used to reference objects which outlive the life time of the buffer AND where the buffer is only used locally. To foster a local usage only, we do not inherit from any standard collection classes.
- Note
This data structure is not thread safe.
-
final
class
RefArrayStack[N >: Null <: AnyRef] extends IndexedSeq[N] with IndexedSeqLike[N, RefArrayStack[N]] with Cloneable[RefArrayStack[N]] with Serializable
An array based implementation of a mutable stack of
refvalues which has a given initial size.An array based implementation of a mutable stack of
refvalues which has a given initial size. If the stack is non-empty, the index of the top value is0and the index of the bottom value is (length-1).- Note
This stack generally keeps all references and is only intended to be used to store elements that outlive the stack. Otherwise, garbage collection may be prevented.
Value Members
- object ArrayMap
-
object
FixedSizeBitSet extends Serializable
Factory to create fixed size bit arrays.
- object FixedSizedHashIDMap
-
object
IntArrayStack extends Serializable
Factory to create IntArrayStacks.
-
object
RefAccumulator
Factory to create RefAccumulators.
- object RefArrayBuffer
-
object
RefArrayStack extends Serializable
Factory to create RefArrayStacks.