de.matthiasmann.twl.model
Class SimpleAutoCompletionResult

java.lang.Object
  extended by de.matthiasmann.twl.model.AutoCompletionResult
      extended by de.matthiasmann.twl.model.SimpleAutoCompletionResult

public class SimpleAutoCompletionResult
extends AutoCompletionResult

A simple auto completion result container which stores the results as strings


Field Summary
 
Fields inherited from class de.matthiasmann.twl.model.AutoCompletionResult
DEFAULT_CURSOR_POS, prefixLength, text
 
Constructor Summary
SimpleAutoCompletionResult(java.lang.String text, int prefixLength, java.util.Collection<java.lang.String> results)
           
SimpleAutoCompletionResult(java.lang.String text, int prefixLength, java.lang.String... results)
           
 
Method Summary
 int getNumResults()
          Returns the number of results
 java.lang.String getResult(int idx)
          Returns a selected result entry
 
Methods inherited from class de.matthiasmann.twl.model.AutoCompletionResult
getCursorPosForResult, getPrefixLength, getText, refine
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleAutoCompletionResult

public SimpleAutoCompletionResult(java.lang.String text,
                                  int prefixLength,
                                  java.util.Collection<java.lang.String> results)

SimpleAutoCompletionResult

public SimpleAutoCompletionResult(java.lang.String text,
                                  int prefixLength,
                                  java.lang.String... results)
Method Detail

getNumResults

public int getNumResults()
Description copied from class: AutoCompletionResult
Returns the number of results

Specified by:
getNumResults in class AutoCompletionResult
Returns:
the number of results

getResult

public java.lang.String getResult(int idx)
Description copied from class: AutoCompletionResult
Returns a selected result entry

Specified by:
getResult in class AutoCompletionResult
Parameters:
idx - the index of the desired result entry
Returns:
the result entry
See Also:
AutoCompletionResult.getNumResults()