org.hyperic.sigar.shell
Class CollectionCompleter

java.lang.Object
  extended by org.hyperic.sigar.shell.CollectionCompleter
All Implemented Interfaces:
GetlineCompleter
Direct Known Subclasses:
FileCompleter

public class CollectionCompleter
extends java.lang.Object
implements GetlineCompleter

GetlineCompleter implementation looks for possible completions using an Iterator.


Constructor Summary
CollectionCompleter()
           
CollectionCompleter(ShellBase shell)
           
CollectionCompleter(ShellBase shell, java.util.Collection collection)
           
 
Method Summary
 java.lang.String complete(java.lang.String line)
           
 java.lang.String displayPossible(java.util.List possible)
           
 java.lang.String displayPossible(java.lang.String[] possible)
           
 java.util.Collection getCollection()
           
 java.util.Iterator getIterator()
           
 java.lang.String getPartialCompletion(java.lang.String[] possible)
           
 void setCollection(java.util.Collection collection)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CollectionCompleter

public CollectionCompleter()

CollectionCompleter

public CollectionCompleter(ShellBase shell)

CollectionCompleter

public CollectionCompleter(ShellBase shell,
                           java.util.Collection collection)
Method Detail

getIterator

public java.util.Iterator getIterator()

getCollection

public java.util.Collection getCollection()

setCollection

public void setCollection(java.util.Collection collection)

getPartialCompletion

public java.lang.String getPartialCompletion(java.lang.String[] possible)

displayPossible

public java.lang.String displayPossible(java.util.List possible)

displayPossible

public java.lang.String displayPossible(java.lang.String[] possible)

complete

public java.lang.String complete(java.lang.String line)
Specified by:
complete in interface GetlineCompleter


Copyright ? 2004-2009 Hyperic. All Rights Reserved.