public boolean touches(IndexRange other) {
        checkArgNotNull(other, "other");
        return other.end == start || end == other.start;
    }
public boolean touches ( IndexRange other ) { checkArgNotNull ( other , "other" ) ; return other . end == start || end == other . start ; }
Determines whether this range immediated follows or precedes the given other one.

@param other the other range
@return true if this range immediated follows or precedes the given other one.