public final class MultiTextSpan extends java.lang.Object implements TextSpan
String.hashCode()
iterates over the internal character array of a new string (new(..), .substring(..), .lowercase(..), ...).
There is a much better version of this in org.chboston.chip.nlp.annotation but this will do for now.Modifier and Type | Field and Description |
---|---|
private int |
_end |
private int |
_hashCode |
private java.util.Collection<TextSpan> |
_missingSpans |
private int |
_start |
Constructor and Description |
---|
MultiTextSpan(int start,
int end,
java.util.Collection<TextSpan> missingSpans)
Given span indices should be ordered start < end, but it is not an absolute requirement.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object object) |
int |
getEnd() |
int |
getLength()
return the length of the full span minus the lengths of the missing spans
|
java.util.Collection<TextSpan> |
getMissingSpans() |
int |
getStart() |
int |
hashCode() |
java.lang.String |
toString() |
private final int _start
private final int _end
private final java.util.Collection<TextSpan> _missingSpans
private final int _hashCode
public MultiTextSpan(int start, int end, java.util.Collection<TextSpan> missingSpans)
start
- start index of a span, be it of a string or otherend
- end index of a span, be it of a string or otherpublic int getStart()
public int getEnd()
public int getLength()
public java.util.Collection<TextSpan> getMissingSpans()
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object object)
equals
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object