class Range implements Comparable<Range> {

	public static boolean containsReaderPosition(long writerStart,
												long writerEnd,
												long readerPosition,
												BufferPositionParser parser)
	{
	  if (readerPosition < 0 ) return false; //empty
	  //just make the reader look the same generation as the writer
	  if (parser.bufferGenId(readerPosition) < parser.bufferGenId(writerStart))
	  {
	    long fakeReaderPos = parser.setGenId(readerPosition, parser.bufferGenId(writerStart));
	    return writerStart <= fakeReaderPos && fakeReaderPos < writerEnd;
	  }
	  else
	  {
	    return writerStart <= readerPosition && readerPosition < writerEnd;
	  }
	}

	public  Range(long startOffset, long endOffset);
	public  Range();

}