KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > jface > internal > text > revisions > LineIndexOutOfBoundsException


1 /*******************************************************************************
2  * Copyright (c) 2005, 2006 IBM Corporation and others.
3  * All rights reserved. This program and the accompanying materials
4  * are made available under the terms of the Eclipse Public License v1.0
5  * which accompanies this distribution, and is available at
6  * http://www.eclipse.org/legal/epl-v10.html
7  *
8  * Contributors:
9  * IBM Corporation - initial API and implementation
10  *******************************************************************************/

11 package org.eclipse.jface.internal.text.revisions;
12
13 /**
14  * Thrown to indicate that an attempt to create or modify a {@link Range} failed because it would
15  * have resulted in an illegal range. A range is illegal if its length is <= 0 or if its start
16  * line is < 0.
17  *
18  * @since 3.2
19  */

20 public final class LineIndexOutOfBoundsException extends IndexOutOfBoundsException JavaDoc {
21     private static final long serialVersionUID= 1L;
22
23     /**
24      * Constructs an <code>LineIndexOutOfBoundsException</code> with no detail message.
25      */

26     public LineIndexOutOfBoundsException() {
27         super();
28     }
29
30     /**
31      * Constructs an <code>LineIndexOutOfBoundsException</code> with the specified detail message.
32      *
33      * @param s the detail message.
34      */

35     public LineIndexOutOfBoundsException(String JavaDoc s) {
36         super(s);
37     }
38     
39     /**
40      * Constructs a new <code>LineIndexOutOfBoundsException</code>
41      * object with an argument indicating the illegal index.
42      *
43      * @param index the illegal index.
44      */

45     public LineIndexOutOfBoundsException(int index) {
46         super("Line index out of range: " + index); //$NON-NLS-1$
47
}
48 }
49
Popular Tags