Class Span
java.lang.Object
org.apache.uima.caseditor.editor.util.Span
- All Implemented Interfaces:
Comparable<Span>
This class usually specifies an continous are of text. This area has an start and end index. The
difference of the end and start is the length of the area.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
Compares the current instance to anotherSpan
object.boolean
Tests if the current instance is equal to o;.int
getEnd()
Returns the end index.int
Returns the length.int
getStart()
Returns the start index.int
hashCode()
Generates a hash code of the current object.boolean
isContaining
(Span containingSpan) Returns true if the given span is a subset of this span.boolean
Checks if is intersecting.toString()
Represents the current object as aString
.
-
Constructor Details
-
Span
public Span(int start, int length) Initializes a newSpan
instance.- Parameters:
start
- the startlength
- the length
-
-
Method Details
-
getStart
public int getStart()Returns the start index.- Returns:
- - start index
-
getLength
public int getLength()Returns the length.- Returns:
- - length
-
getEnd
public int getEnd()Returns the end index.- Returns:
- - end index
-
isContaining
Returns true if the given span is a subset of this span.- Parameters:
containingSpan
- - the span to compare- Returns:
- - true if containingSpan is a subset.
-
isIntersecting
Checks if is intersecting.- Parameters:
s
- the s- Returns:
- true, if is intersecting
-
compareTo
Compares the current instance to anotherSpan
object.- Specified by:
compareTo
in interfaceComparable<Span>
- Parameters:
span
- the span- Returns:
- the int
-
equals
Tests if the current instance is equal to o;. -
toString
Represents the current object as aString
. -
hashCode
public int hashCode()Generates a hash code of the current object.
-