@Immutable public final class MultiTextSpan extends 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.Constructor and Description |
---|
MultiTextSpan(int start,
int end,
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(Object object) |
int |
getEnd() |
int |
getLength()
return the length of the full span minus the lengths of the missing spans
|
Collection<TextSpan> |
getMissingSpans() |
int |
getStart() |
int |
hashCode() |
String |
toString() |
public MultiTextSpan(int start, int end, 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 Collection<TextSpan> getMissingSpans()
public int hashCode()
public boolean equals(Object object)
Copyright © 2012-2017 The Apache Software Foundation. All Rights Reserved.