de.ls5.jlearn.interfaces
Interface Word

All Superinterfaces:
Comparable<Word>, Serializable
All Known Implementing Classes:
CWord, WordImpl

public interface Word
extends Comparable<Word>, Serializable

A Word is an ordered set of Symbol objects. Learning queries and system responses (amongst potentially other things) are represented as Word objects.

Author:
merten

Method Summary
 void addSymbol(Symbol symbol)
          add Symbol to word
 Symbol[] getSymbolArray()
          Assemble an array of symbols in this word
 Symbol getSymbolByIndex(int i)
          Return symbol that is at the supplied position
 List<Symbol> getSymbolList()
          Assemble a list of symbols in this word
 boolean isPrefixOf(Word w)
          Checks if this word is a prefix of the supplied word.
 int size()
          Determine number of symbols in this word
 
Methods inherited from interface java.lang.Comparable
compareTo
 

Method Detail

addSymbol

void addSymbol(Symbol symbol)
add Symbol to word

Parameters:
symbol -

getSymbolArray

Symbol[] getSymbolArray()
Assemble an array of symbols in this word

Returns:
array of symbols

getSymbolList

List<Symbol> getSymbolList()
Assemble a list of symbols in this word

Returns:
list of symbols

isPrefixOf

boolean isPrefixOf(Word w)
Checks if this word is a prefix of the supplied word.

Parameters:
w -
Returns:
true if this word is prefix, false otherwise

size

int size()
Determine number of symbols in this word

Returns:
number of symbols in word

getSymbolByIndex

Symbol getSymbolByIndex(int i)
Return symbol that is at the supplied position

Parameters:
i -
Returns:
symbol at position i, null if no such symbol exists


Copyright © 2011. All Rights Reserved.