ix.ip2
Class SimpleUnreadyReason

java.lang.Object
  extended by ix.ip2.ActionUnreadyReason
      extended by ix.ip2.SimpleUnreadyReason

public class SimpleUnreadyReason
extends ActionUnreadyReason

A simple explanation of why a HandlerAction is not ready to be used. This class should be used when there is only a textual explanation, without any inspectable objects that are relevant to the explanation.

See Also:
HandlerAction.isReady(), HandlerAction.getUnreadyReason()

Field Summary
protected  java.lang.String[] explanation
           
 
Fields inherited from class ix.ip2.ActionUnreadyReason
action
 
Constructor Summary
SimpleUnreadyReason(HandlerAction action, java.lang.String explanation)
          Creates a simple unready reason with a one-line explanation.
SimpleUnreadyReason(HandlerAction action, java.lang.String[] explanation)
          Creates a simple unready reason with a possibly multi-line explanation.
 
Method Summary
 java.lang.String[] getExplanation()
          Returns an explanation in natural language, suitable for presenting to a user.
 
Methods inherited from class ix.ip2.ActionUnreadyReason
getAction
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

explanation

protected java.lang.String[] explanation
Constructor Detail

SimpleUnreadyReason

public SimpleUnreadyReason(HandlerAction action,
                           java.lang.String explanation)
Creates a simple unready reason with a one-line explanation.


SimpleUnreadyReason

public SimpleUnreadyReason(HandlerAction action,
                           java.lang.String[] explanation)
Creates a simple unready reason with a possibly multi-line explanation.

Method Detail

getExplanation

public java.lang.String[] getExplanation()
Description copied from class: ActionUnreadyReason
Returns an explanation in natural language, suitable for presenting to a user. Successive elements of the returned array are treated as successive lines of the explanation.

Specified by:
getExplanation in class ActionUnreadyReason