Modifiable

trait Modifiable[T <: Txn[T], A] extends BiGroup[T, A]
Companion:
object
trait BiGroup[T, A]
trait Obj[T]
trait Mutable[T]
trait Identified[T]
trait Elem[T]
trait Publisher[T, Update[T, A, BiGroup[T, A]]]
trait Disposable[T]
trait Writable
trait Form[T]
class Object
trait Matchable
class Any
class Impl[T, A, Repr]

Value members

Abstract methods

def add(span: SpanLikeObj[T], elem: A)(implicit tx: T): Entry[T, A]
override def changed: EventLike[T, Update[T, A, Modifiable[T, A]]]
Definition Classes
Publisher
def clear()(implicit tx: T): Unit
def remove(span: SpanLikeObj[T], elem: A)(implicit tx: T): Boolean

Inherited methods

final def attr(implicit tx: T): AttrMap[T]
Inherited from:
Obj
def debugList(implicit tx: T): List[(SpanLike, A)]
Inherited from:
BiGroup
def debugPrint(implicit tx: T): String
Inherited from:
BiGroup
def dispose()(implicit tx: T): Unit
Inherited from:
Disposable
override def equals(that: Any): Boolean
Definition Classes
Identified -> Any
Inherited from:
Identified
def eventAfter(time: Long)(implicit tx: T): Option[Long]

Queries the closest event (an element's span starting or stopping) later than the given time

Queries the closest event (an element's span starting or stopping) later than the given time

Value parameters:
time

the query time

Returns:

a time, greater than the query time, at which the next event occurs, or None if there are no events after the query time

Inherited from:
BiGroup
def eventBefore(time: Long)(implicit tx: T): Option[Long]

Queries the closest event (an element's span starting or stopping) earlier than the given time

Queries the closest event (an element's span starting or stopping) earlier than the given time

Value parameters:
time

the query time

Returns:

a time, smaller than the query time, at which the previous event occurs, or None if there are no events before the query time

Inherited from:
BiGroup
def eventsAt(time: Long)(implicit tx: T): (Iterator[(T, A)], Iterator[(T, A)])

Queries all elements which produce an event (starting or stopping) at a given time.

Queries all elements which produce an event (starting or stopping) at a given time.

Value parameters:
time

the time instant for which to gather the events

Returns:

a tuple of two iterators. the first iterator (_1) contains the events which start at the query time, the second iterator (_2) contains the event which stop at the query time

Inherited from:
BiGroup
def firstEvent(implicit tx: T): Option[Long]

Finds the first occurring event, if there is any. Ignores objects with Span.All.

Finds the first occurring event, if there is any. Ignores objects with Span.All.

Inherited from:
BiGroup
def get(span: SpanLike)(implicit tx: T): IndexedSeq[Entry[T, A]]

Finds the leaf for a given span value (if it exists).

Finds the leaf for a given span value (if it exists).

Inherited from:
BiGroup
override def hashCode: Int
Definition Classes
Identified -> Any
Inherited from:
Identified
def id: Ident[T]
Inherited from:
Identified
def intersect(span: SpanLike)(implicit tx: T): Iterator[(T, A)]

Queries all elements intersecting a given time span. That is, returns an iterator of all elements whose span contains or partly overlaps the query span. (span start < query.stop && span.stop > query.start)

Queries all elements intersecting a given time span. That is, returns an iterator of all elements whose span contains or partly overlaps the query span. (span start < query.stop && span.stop > query.start)

This methods makes no guarantees about the ordering of the returned iterator.

Value parameters:
span

the the span to search within (this may be a half-bounded interval or even Span.All)

Returns:

a (possibly empty) iterator of the intersecting elements

Inherited from:
BiGroup
def intersect(time: Long)(implicit tx: T): Iterator[(T, A)]

Queries all elements intersecting a given point in time. That is, returns an iterator of all elements whose span contains the time point (span start <= time && span.stop > time)

Queries all elements intersecting a given point in time. That is, returns an iterator of all elements whose span contains the time point (span start <= time && span.stop > time)

This methods makes no guarantees about the ordering of the returned iterator.

Value parameters:
time

the point in time to search at

Returns:

a (possibly empty) iterator of the intersecting elements

Inherited from:
BiGroup
def isEmpty(implicit tx: T): Boolean

Returns true if not a single element is contained in the collection.

Returns true if not a single element is contained in the collection.

Inherited from:
BiGroup
def iterator(implicit tx: T): Iterator[(T, A)]
Inherited from:
BiGroup
def lastEvent(implicit tx: T): Option[Long]

Finds the last occurring event, if there is any. Ignores objects with Span.All.

Finds the last occurring event, if there is any. Ignores objects with Span.All.

Inherited from:
BiGroup
def modifiableOption: Option[Modifiable[T, A]]
Inherited from:
BiGroup
def nonEmpty(implicit tx: T): Boolean

Returns true if at least one element is contained in the collection.

Returns true if at least one element is contained in the collection.

Inherited from:
BiGroup
def rangeSearch(start: SpanLike, stop: SpanLike)(implicit tx: T): Iterator[(T, A)]

Performs a range query according to separate intervals for the allowed start and stop positions of the element spans. That is, returns an iterator of all elements whose span satisfies the constraints given for start and stop positions (start.contains( elem.span.start ) && stop.contains( elem.span.stop ))

Performs a range query according to separate intervals for the allowed start and stop positions of the element spans. That is, returns an iterator of all elements whose span satisfies the constraints given for start and stop positions (start.contains( elem.span.start ) && stop.contains( elem.span.stop ))

Both for the start and stop constraint, half-bounded or unbounded (Span.All) intervals can be used. Examples

  • to find all elements which start between 10 (inclusive) and 20 (exclusive), use start = Span( 10, 20 ), stop = Span.All.
  • to find all elements which start before (<) 10 and stop from (>=) 20, use start = Span.until( 10 ), stop = Span.from( 20 ).

This methods makes no guarantees about the ordering of the returned iterator.

Value parameters:
start

the constraint for the start position of the spans of the elements filtered.

stop

the constraint for the stop position of the spans of the elements filtered.

Returns:

a (possibly empty) iterator of the intersecting elements

Inherited from:
BiGroup
def recoverSpan(span: SpanLike, elem: A)(implicit tx: T): Option[SpanLikeObj[T]]

Tries to recover the actual object of an element's position, given only an evaluated span. The result may for example be used in a subsequent removal of the element.

Tries to recover the actual object of an element's position, given only an evaluated span. The result may for example be used in a subsequent removal of the element.

Inherited from:
BiGroup
override def toString: String
Definition Classes
Obj -> Any
Inherited from:
Obj
override def tpe: Type
Definition Classes
Obj -> Elem
Inherited from:
Obj
def write(out: DataOutput): Unit
Inherited from:
Writable