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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintCompares the current instance to anotherSpanobject.booleanTests if the current instance is equal to o;.intgetEnd()Returns the end index.intReturns the length.intgetStart()Returns the start index.inthashCode()Generates a hash code of the current object.booleanisContaining(Span containingSpan) Returns true if the given span is a subset of this span.booleanChecks if is intersecting.toString()Represents the current object as aString.
-
Constructor Details
-
Span
public Span(int start, int length) Initializes a newSpaninstance.- 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 anotherSpanobject.- Specified by:
compareToin 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.
-