28 |
|
|
29 |
package org.nongnu.alph; |
package org.nongnu.alph; |
30 |
|
|
31 |
/** A 1-dimensional span inside one document. |
/** A 1-dimensional immutable span inside one document. |
32 |
* The different routines use "natural units" the definition |
* The different routines use "natural units" the definition |
33 |
* of which depends on the span type - see the appropriate subinterfaces. |
* of which depends on the span type - see the appropriate subinterfaces. |
|
* <b>IMMUTABLE</b> |
|
34 |
*/ |
*/ |
35 |
|
|
36 |
public interface Span1D extends Span { |
public interface Span1D extends Span { |
37 |
String rcsid = "$Id$"; |
String rcsid = "$Id$"; |
38 |
|
|
39 |
/** Get the offset of this span inside the Mediaserver block, |
/** Get the offset of this span inside the scrollblock, |
40 |
* in natural units starting at zero. |
* in natural units starting at zero. |
41 |
*/ |
*/ |
42 |
int offset(); |
int offset(); |
58 |
*/ |
*/ |
59 |
Span1D subSpan(int o1); |
Span1D subSpan(int o1); |
60 |
|
|
|
/** Get the start of the given subspan, relative to the start of this. |
|
|
* subspan must be wholly contained in this span; otherwise, an error |
|
|
* is thrown. |
|
|
*/ |
|
|
int getRelativeStart(Span1D subspan); |
|
|
|
|
|
/** Get the end of the given subspan, relative to the start of this. |
|
|
* subspan must be wholly contained in this span; otherwise, an error |
|
|
* is thrown. |
|
|
*/ |
|
|
int getRelativeEnd(Span1D subspan); |
|
|
|
|
61 |
/** Return the span that results from appending the other span |
/** Return the span that results from appending the other span |
62 |
* to this span, <em>if</em> the resulting span is contiguous. |
* to this span, <em>if</em> the resulting span is contiguous. |
63 |
* Otherwise, returns null. |
* Otherwise, returns null. |