/** * Creates a new selection from the given start and length. * * @param s the start offset of the selection (inclusive) * @param l the length of the selection * @return the created selection object */ public static Selection createFromStartLength(int s, int l) { Assert.isTrue(s >= 0 && l >= 0); Selection result= new Selection(); result.fStart= s; result.fLength= l; result.fExclusiveEnd= s + l; return result; }
/** * Creates a new selection from the given start and length. * * @param s the start offset of the selection (inclusive) * @param l the length of the selection * @return the created selection object */ public static Selection createFromStartLength(int s, int l) { Assert.isTrue(s >= 0 && l >= 0); Selection result= new Selection(); result.fStart= s; result.fLength= l; result.fExclusiveEnd= s + l; return result; }
/** * Creates a new selection from the given start and end. * * @param s the start offset of the selection (inclusive) * @param e the end offset of the selection (inclusive) * @return the created selection object */ public static Selection createFromStartEnd(int s, int e) { Assert.isTrue(s >= 0 && e >= s); Selection result= new Selection(); result.fStart= s; result.fLength= e - s + 1; result.fExclusiveEnd= result.fStart + result.fLength; return result; }
/** * Creates a new selection from the given start and end. * * @param s the start offset of the selection (inclusive) * @param e the end offset of the selection (inclusive) * @return the created selection object */ public static Selection createFromStartEnd(int s, int e) { Assert.isTrue(s >= 0 && e >= s); Selection result= new Selection(); result.fStart= s; result.fLength= e - s + 1; result.fExclusiveEnd= result.fStart + result.fLength; return result; }
/** * Creates a new selection from the given start and length. * * @param s the start offset of the selection (inclusive) * @param l the length of the selection * @return the created selection object */ public static Selection createFromStartLength(int s, int l) { Assert.isTrue(s >= 0 && l >= 0); Selection result= new Selection(); result.fStart= s; result.fLength= l; result.fExclusiveEnd= s + l; return result; }
/** * Creates a new selection from the given start and end. * * @param s the start offset of the selection (inclusive) * @param e the end offset of the selection (inclusive) * @return the created selection object */ public static Selection createFromStartEnd(int s, int e) { Assert.isTrue(s >= 0 && e >= s); Selection result= new Selection(); result.fStart= s; result.fLength= e - s + 1; result.fExclusiveEnd= result.fStart + result.fLength; return result; }