Trait/Object

de.sciss.span

Span

Related Docs: object Span | package span

Permalink

sealed trait Span extends SpanOrVoid with HasStart with HasStop

Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Span
  2. HasStop
  3. HasStart
  4. Bounded
  5. NonVoid
  6. SpanOrVoid
  7. HasStopOrVoid
  8. HasStartOrVoid
  9. SpanLike
  10. Writable
  11. AnyRef
  12. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Abstract Value Members

  1. abstract def clip(pos: Long): Long

    Permalink

    Clips a position to this span's boundary.

    Clips a position to this span's boundary. Note that the span's stop position is included. Thus the result is greater than or equal the start, and less than or equal (!) the stop.

    For the special cases of Span.All and Span.Void, this method returns the argument unchanged.

    pos

    the point to clip

    returns

    the clipped point

    Definition Classes
    SpanLike
  2. abstract def contains(that: SpanLike): Boolean

    Permalink

    Checks if another span lies within the span.

    Checks if another span lies within the span. The result is false if either of the two spans is void.

    that

    second span

    returns

    true, if that.start >= this.start && that.stop <= this.stop

    Definition Classes
    SpanLike
  3. abstract def contains(pos: Long): Boolean

    Permalink

    Checks if a position lies within the span.

    Checks if a position lies within the span. Note that this returns false if this.stop == pos.

    returns

    true, if start <= pos < stop

    Definition Classes
    SpanLike
  4. abstract def intersect(that: SpanLike): SpanOrVoid

    Permalink

    Construct the intersection between this and another span.

    Construct the intersection between this and another span. If the two spans are disjoint, the result will be empty. An empty result may be a Span if the two spans touched each other, or Span.Void if they did not touch each other. If either span is Span.All, the other span is returned. If either span is void, Span.Void will be returned.

    This method is commutative (a intersect b == b intersect a).

    that

    the span to form the intersection with

    returns

    the intersection span (possibly empty)

    Definition Classes
    SpanHasStartSpanOrVoidSpanLike
  5. abstract def isEmpty: Boolean

    Permalink

    Checks if the span is empty.

    Checks if the span is empty. A span is empty if it is a Span with start == stop or if it is void.

    returns

    true, if start == stop

    Definition Classes
    SpanLike
  6. abstract def length: Long

    Permalink

    The span's length.

    The span's length. For a void span, this is zero, otherwise it is stop - start.

    Definition Classes
    SpanOrVoid
  7. abstract def nonEmpty: Boolean

    Permalink

    Checks if the span is non empty.

    Checks if the span is non empty. This is exactly the opposite value of isEmpty.

    Definition Classes
    SpanLike
  8. abstract def nonEmptyOption: Option[Span]

    Permalink
    Definition Classes
    SpanOrVoidHasStopOrVoidHasStartOrVoidSpanLike
  9. abstract def overlaps(that: SpanLike): Boolean

    Permalink

    Checks if a two spans overlap each other.

    Checks if a two spans overlap each other. Two spans overlap if the overlapping area is greater than or equal to 1. This implies that if either span is empty, the result will be false.

    This method is commutative (a overlaps b == b overlaps a).

    that

    second span

    returns

    true, if the spans overlap each other

    Definition Classes
    SpanLike
  10. abstract def shift(delta: Long): Span

    Permalink

    Shifts the span, that is applies an offset to its start and stop.

    Shifts the span, that is applies an offset to its start and stop. For single sided open spans (Span.From and Span.Until) this alters the only bounded value. For Span.All and Span.Void this returns the object unchanged.

    delta

    the shift amount (the amount to be added to the span's positions)

    returns

    the shifted span

    Definition Classes
    SpanHasStopHasStartBoundedNonVoidSpanOrVoidHasStopOrVoidHasStartOrVoidSpanLike
  11. abstract def start: Long

    Permalink

    returns

    the start position of the span. this is considered included in the interval

    Definition Classes
    HasStart
  12. abstract def startOption: Option[Long]

    Permalink
    Definition Classes
    SpanLike
  13. abstract def startOrElse(default: ⇒ Long): Long

    Permalink
    Definition Classes
    SpanLike
  14. abstract def stop: Long

    Permalink

    returns

    the stop position of the span. this is considered excluded in the interval

    Definition Classes
    HasStop
  15. abstract def stopOption: Option[Long]

    Permalink
    Definition Classes
    SpanLike
  16. abstract def stopOrElse(default: ⇒ Long): Long

    Permalink
    Definition Classes
    SpanLike
  17. abstract def subtract(that: SpanLike): IndexedSeq[Span]

    Permalink

    Subtracts a given span from this span.

    Subtracts a given span from this span. Note that an empty span argument "cuts" this span, e.g. Span.all subtract Span(30,30) == Seq(Span.until(30),Span.from(30))

    that

    the span to subtract

    returns

    a collection of spans after the argument was subtracted. Unlike intersect, this method filters out empty spans, thus a span subtracted from itself produces an empty collection. if that is a Span, the result might be two disjoint spans.

    Definition Classes
    SpanHasStartSpanOrVoidSpanLike
  18. abstract def subtract(that: Open): SpanOrVoid

    Permalink

    Subtracts a given open span from this span.

    Subtracts a given open span from this span.

    that

    the span to subtract

    returns

    the reduced span, possibly empty or void

    Definition Classes
    SpanHasStartSpanOrVoidSpanLike
  19. abstract def touches(that: SpanLike): Boolean

    Permalink

    Checks if a two spans overlap or touch each other.

    Checks if a two spans overlap or touch each other. Two spans touch each other if they either overlap or they share a common point with each other (this span's start or stop is that span's start or stop).

    This method is commutative (a touches b == b touches a).

    that

    second span

    returns

    true, if the spans touch each other

    Definition Classes
    SpanLike
  20. abstract def union(that: Span): Span

    Permalink
  21. abstract def union(that: SpanLike): SpanLike

    Permalink

    Constructs a single span which contains both this and that span.

    Constructs a single span which contains both this and that span. If the two spans are disjoint, the result will be a span with start = min(this.start, that.start) and stop = max(this.stop, that.stop). If either span is void, the other span is returned. If either span is Span.All, Span.All will be returned.

    This method is commutative (a union b == b union a).

    that

    the span to form the union with

    returns

    the encompassing span

    Definition Classes
    SpanLike
  22. abstract def write(out: DataOutput): Unit

    Permalink
    Definition Classes
    Writable

Concrete Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  5. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  6. final def compareStart(pos: Long): Int

    Permalink

    Compares the span's start to a given position

    Compares the span's start to a given position

    returns

    -1, if the span start lies before the query position, 1, if it lies after that position, or 0, if both are the same

    Definition Classes
    HasStartSpanLike
  7. final def compareStop(pos: Long): Int

    Permalink

    Compares the span's stop to a given position

    Compares the span's stop to a given position

    returns

    -1, if the span stop lies before the query position, 1, if it lies after that position, or 0, if both are the same

    Definition Classes
    HasStopSpanLike
  8. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  9. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  10. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  11. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  12. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  13. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  14. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  15. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  16. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  17. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  18. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  19. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  20. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  21. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from HasStop

Inherited from HasStart

Inherited from Bounded

Inherited from NonVoid

Inherited from SpanOrVoid

Inherited from HasStopOrVoid

Inherited from HasStartOrVoid

Inherited from SpanLike

Inherited from Writable

Inherited from AnyRef

Inherited from Any

Ungrouped