basic
Class Context

java.lang.Object
  extended by basic.WordList
      extended by basic.Context

public class Context
extends WordList

Represents context, stores list of words and position of keyword.

Author:
Mateusz Kopec

Constructor Summary
Context()
          Constructor
Context(Context context)
          Constructor which copies another context
 
Method Summary
 void cutToWindow(int contextWindow)
          Narrows the context to chosen window width
 int getKeywordIndex()
          Gets the index of keyword in context
 void setKeywordIndex(int i)
          Sets the index of keyword in context
 java.lang.String toString()
           
 
Methods inherited from class basic.WordList
addWord, getBases, getOrths
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Context

public Context(Context context)
Constructor which copies another context

Parameters:
context - context to copy

Context

public Context()
Constructor

Method Detail

setKeywordIndex

public void setKeywordIndex(int i)
Sets the index of keyword in context

Parameters:
i -

getKeywordIndex

public int getKeywordIndex()
Gets the index of keyword in context

Returns:
index

cutToWindow

public void cutToWindow(int contextWindow)
Narrows the context to chosen window width

Parameters:
contextWindow - width

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object