com.intellij.lang.cacheBuilder
Class WordOccurrence

java.lang.Object
  extended by com.intellij.lang.cacheBuilder.WordOccurrence

public class WordOccurrence
extends java.lang.Object

A single word instance extracted by WordsScanner.


Nested Class Summary
static class WordOccurrence.Kind
          Defines possible locations where words can be encountered.
 
Constructor Summary
WordOccurrence(java.lang.CharSequence text, WordOccurrence.Kind kind)
          Creates a new occurrence with the specified text and kind.
 
Method Summary
 WordOccurrence.Kind getKind()
          Returns the type of text where the word was encountered (code, comments or literals).
 java.lang.CharSequence getText()
          Returns the text of the occurred word.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WordOccurrence

public WordOccurrence(java.lang.CharSequence text,
                      @Nullable
                      WordOccurrence.Kind kind)
Creates a new occurrence with the specified text and kind.

Parameters:
text - The text of the word.
kind - The type of text where the word was encountered (code, comments or literals).
Method Detail

getKind

@Nullable
public WordOccurrence.Kind getKind()
Returns the type of text where the word was encountered (code, comments or literals).

Returns:
the kind of the occurrence.

getText

public java.lang.CharSequence getText()
Returns the text of the occurred word.

Returns:
the text of the word.