KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > jface > text > rules > IWordDetector


1 /*******************************************************************************
2  * Copyright (c) 2000, 2005 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.text.rules;
12
13
14 /**
15  * Defines the interface by which <code>WordRule</code>
16  * determines whether a given character is valid as part
17  * of a word in the current context.
18  */

19 public interface IWordDetector {
20
21     /**
22      * Returns whether the specified character is
23      * valid as the first character in a word.
24      *
25      * @param c the character to be checked
26      * @return <code>true</code> is a valid first character in a word, <code>false</code> otherwise
27      */

28     boolean isWordStart(char c);
29
30     /**
31      * Returns whether the specified character is
32      * valid as a subsequent character in a word.
33      *
34      * @param c the character to be checked
35      * @return <code>true</code> if the character is a valid word part, <code>false</code> otherwise
36      */

37     boolean isWordPart(char c);
38 }
39
Popular Tags