org.nakedobjects.applib.util
Class ReasonBuffer

java.lang.Object
  extended by org.nakedobjects.applib.util.ReasonBuffer

public class ReasonBuffer
extends java.lang.Object

Helper class to create properly concatenated reason string for use in method that return Strings with reasons.

If no reasons are specified getReason() will return null , otherwise it will return a String with all the valid reasons concatenated with a semi-colon separating each one.


Constructor Summary
ReasonBuffer()
           
 
Method Summary
 void append(java.lang.String reason)
          Append a reason to the list of existing reasons.
 void appendOnCondition(boolean condition, java.lang.String reason)
          Append a reason to the list of existing reasons if the condition flag is true.
 java.lang.String getReason()
          Return the combined set of reasons, or null if there are none.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ReasonBuffer

public ReasonBuffer()
Method Detail

append

public void append(java.lang.String reason)
Append a reason to the list of existing reasons.


appendOnCondition

public void appendOnCondition(boolean condition,
                              java.lang.String reason)
Append a reason to the list of existing reasons if the condition flag is true.


getReason

public java.lang.String getReason()
Return the combined set of reasons, or null if there are none.



Copyright © 2001-2009 Naked Objects Group Ltd.. All Rights Reserved.