You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by Elijah Zupancic <el...@zupancic.name> on 2012/04/16 02:33:00 UTC
[chain] Proposed patch to the Command interface
After working on a servlet with catalog support for the cookbook, I
would like to suggest the following modification to the Command
interface for better readability of implementations of the interface:
Index: Command.java
===================================================================
--- Command.java (revision 1307931)
+++ Command.java (working copy)
@@ -84,6 +84,10 @@
*/
public interface Command<K, V, C extends Map<K, V>> {
+ /** Boolean value to return when processing is complete. */
+ public static final boolean COMPLETE = true;
+ /** Boolean value to return when processing is not complete. */
+ public static final boolean INCOMPLETE = false;
/**
* <p>Commands should return <code>CONTINUE_PROCESSING</code> if
the processing
I think that the simple addition of a named flag for complete or
incomplete processing of the chain is more understandable than the
current boolean value. Currently, "false" means keep processing and
"true" means stop processing.
Thanks,
-Elijah
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org
Re: [chain] Proposed patch to the Command interface
Posted by Elijah Zupancic <el...@zupancic.name>.
Well, this is embarrassing. The code that I'm suggesting adding exists
right below the line in my patch. I think I need a break.
Please disregard my previous message.
Thanks,
-Elijah
On Sun, Apr 15, 2012 at 5:33 PM, Elijah Zupancic <el...@zupancic.name> wrote:
> After working on a servlet with catalog support for the cookbook, I
> would like to suggest the following modification to the Command
> interface for better readability of implementations of the interface:
>
> Index: Command.java
> ===================================================================
> --- Command.java (revision 1307931)
> +++ Command.java (working copy)
> @@ -84,6 +84,10 @@
> */
>
> public interface Command<K, V, C extends Map<K, V>> {
> + /** Boolean value to return when processing is complete. */
> + public static final boolean COMPLETE = true;
> + /** Boolean value to return when processing is not complete. */
> + public static final boolean INCOMPLETE = false;
>
> /**
> * <p>Commands should return <code>CONTINUE_PROCESSING</code> if
> the processing
>
> I think that the simple addition of a named flag for complete or
> incomplete processing of the chain is more understandable than the
> current boolean value. Currently, "false" means keep processing and
> "true" means stop processing.
>
> Thanks,
> -Elijah
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org