upload tizen1.0 source
[sdk/ide/product.git] / org.eclipse.cdt.ui / src / org / eclipse / cdt / internal / ui / text / spelling / engine / ISpellCheckIterator.java
1 /*******************************************************************************
2  * Copyright (c) 2000, 2008 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  *     Sergey Prigogin (Google)
11  *******************************************************************************/
12
13 package org.eclipse.cdt.internal.ui.text.spelling.engine;
14
15 import java.util.Iterator;
16
17 /**
18  * Interface for iterators used for spell checking.
19  */
20 public interface ISpellCheckIterator extends Iterator<String> {
21         /**
22          * Returns the begin index (inclusive) of the current word.
23          *
24          * @return The begin index of the current word
25          */
26         public int getBegin();
27
28         /**
29          * Returns the end index (exclusive) of the current word.
30          *
31          * @return The end index of the current word
32          */
33         public int getEnd();
34
35         /**
36          * Does the current word start a new sentence?
37          *
38          * @return <code>true<code> iff the current word starts a new sentence, <code>false</code> otherwise
39          */
40         public boolean startsSentence();
41
42         /**
43          * Tells whether to ignore single letters
44          * from being checked.
45          * 
46          * @param state <code>true</code> if single letters should be ignored
47          */
48         public void setIgnoreSingleLetters(boolean state);
49 }