sdr 0.21

net.cscott.sdr
Class CommandInput.PossibleCommand

java.lang.Object
  extended by net.cscott.sdr.CommandInput.PossibleCommand
All Implemented Interfaces:
Iterable<CommandInput.PossibleCommand>
Enclosing class:
CommandInput

public abstract static class CommandInput.PossibleCommand
extends Object
implements Iterable<CommandInput.PossibleCommand>

A CommandInput.PossibleCommand is an Apply corresponding to the most likely interpretation of the user's input. If this Apply is inapplicable to the given formation, we can use the next() method to get the next-most-likely interpretation of the input, and try that before giving up and complaining to the user.


Constructor Summary
CommandInput.PossibleCommand()
           
 
Method Summary
abstract  Apply getApply()
          Return the parsed command possibility; throwing BadCallException if there is a problem with the parse.
abstract  long getEndTime()
          Return the time the user input was complete, in milliseconds since the epoch.
abstract  long getStartTime()
          Return the time the user input began, in milliseconds since the epoch.
abstract  String getUserInput()
          Return the raw user input.
 Iterator<CommandInput.PossibleCommand> iterator()
           
abstract  CommandInput.PossibleCommand next()
          Return the next possible command, or null if there are no more.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CommandInput.PossibleCommand

public CommandInput.PossibleCommand()
Method Detail

getUserInput

public abstract String getUserInput()
Return the raw user input.


getStartTime

public abstract long getStartTime()
Return the time the user input began, in milliseconds since the epoch.


getEndTime

public abstract long getEndTime()
Return the time the user input was complete, in milliseconds since the epoch.


getApply

public abstract Apply getApply()
                        throws BadCallException
Return the parsed command possibility; throwing BadCallException if there is a problem with the parse.

Throws:
BadCallException

next

public abstract CommandInput.PossibleCommand next()
Return the next possible command, or null if there are no more.


iterator

public final Iterator<CommandInput.PossibleCommand> iterator()
Specified by:
iterator in interface Iterable<CommandInput.PossibleCommand>

sdr 0.21

Copyright (c) 2006 C. Scott Ananian