Jitsi: the OpenSource Java VoIP and Instant Messaging client.

net.java.sip.communicator.plugin.spellcheck
Class Word

java.lang.Object
  extended by net.java.sip.communicator.plugin.spellcheck.Word

 class Word
extends Object

Immutable representation of a word in the context of a document, bundling the bounds with the text.

Author:
Damian Johnson

Method Summary
 int getEnd()
           
 int getStart()
           
 String getText()
           
static Word getWord(String text, int index, boolean before)
          Provides the word before or after a given index.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

getWord

public static Word getWord(String text,
                           int index,
                           boolean before)
Provides the word before or after a given index. No bounds checking is performed.

Parameters:
text - text to be checked
index - index in which to begin search (inclusive)
before - search is before index if true, after otherwise
Returns:
index of word boundary

getStart

public int getStart()

getEnd

public int getEnd()

getText

public String getText()

toString

public String toString()
Overrides:
toString in class Object

Jitsi: the OpenSource Java VoIP and Instant Messaging client.

Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under LGPL license.