30 |
} |
} |
31 |
|
|
32 |
public boolean intersects(Span s) { |
public boolean intersects(Span s) { |
33 |
if(!(s instanceof URN5Span)) return false; |
if(!(s instanceof URN5TextSpan)) return false; |
34 |
URN5TextSpan other = (URN5TextSpan)s; |
URN5TextSpan other = (URN5TextSpan)s; |
35 |
// Because urn5 is interned, can do this |
// Because urn5 is interned, can do this |
36 |
if(other.urn5 != urn5) return false; |
if(other.urn5 != urn5) return false; |
84 |
} |
} |
85 |
|
|
86 |
public Span1D append(Span s) { |
public Span1D append(Span s) { |
87 |
if(!(s instanceof URN5Span)) return null; |
if(!(s instanceof URN5TextSpan)) return null; |
88 |
URN5TextSpan other = (URN5TextSpan)s; |
URN5TextSpan other = (URN5TextSpan)s; |
89 |
if(other.urn5 != urn5) return null; |
if(other.urn5 != urn5) return null; |
90 |
if(offset + str.length() != other.offset) return null; |
if(offset + str.length() != other.offset) return null; |