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
9 * IBM Corporation - initial API and implementation
10 * Sergey Prigogin (Google)
11 *******************************************************************************/
13 package org.eclipse.cdt.internal.ui.text.spelling.engine;
15 import java.util.Iterator;
18 * Interface for iterators used for spell checking.
20 public interface ISpellCheckIterator extends Iterator<String> {
22 * Returns the begin index (inclusive) of the current word.
24 * @return The begin index of the current word
26 public int getBegin();
29 * Returns the end index (exclusive) of the current word.
31 * @return The end index of the current word
36 * Does the current word start a new sentence?
38 * @return <code>true<code> iff the current word starts a new sentence, <code>false</code> otherwise
40 public boolean startsSentence();
43 * Tells whether to ignore single letters
46 * @param state <code>true</code> if single letters should be ignored
48 public void setIgnoreSingleLetters(boolean state);