public final boolean overlaps (long position, long size)

Tells whether or not this lock overlaps the given lock range.

position     The starting position of the lock range
size     The size of the lock range

Returns:  true if, and only if, this lock and the given lock range overlap by at least one byte