Version 4.10.0

hirondelle.web4j.model
Class MessageListImpl

Object
  extended by hirondelle.web4j.model.MessageListImpl
All Implemented Interfaces:
MessageList, Serializable

public class MessageListImpl
extends Object
implements MessageList, Serializable

General implementation of MessageList.

See Also:
Serialized Form

Constructor Summary
MessageListImpl()
          Create an empty MessageList.
MessageListImpl(String aMessage)
          Create a MessageList having one simple AppResponseMessage.
MessageListImpl(String aMessage, Object... aParams)
          Create a MessageList having one compound AppResponseMessage.
 
Method Summary
 void add(AppException ex)
          Add all AppResponseMessages attached to aAppEx to this list.
 void add(String aMessage)
          Add a simple AppResponseMessage to this list.
 void add(String aMessage, Object... aParams)
          Add a compound AppResponseMessage to this list.
 List<AppResponseMessage> getMessages()
          Return an unmodifiable List of AppResponseMessages.
 boolean isEmpty()
          Return true only if there are no messages in this list.
 boolean isNotEmpty()
          Return the negation of MessageList.isEmpty().
 String toString()
          Intended for debugging only.
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MessageListImpl

public MessageListImpl()
Create an empty MessageList.


MessageListImpl

public MessageListImpl(String aMessage)
Create a MessageList having one simple AppResponseMessage.

The argument satisfies the same conditions as AppResponseMessage.forSimple(java.lang.String).


MessageListImpl

public MessageListImpl(String aMessage,
                       Object... aParams)
Create a MessageList having one compound AppResponseMessage.

The arguments satisfy the same conditions as AppResponseMessage.forCompound(java.lang.String, java.lang.Object...).

Method Detail

add

public final void add(String aMessage)
Description copied from interface: MessageList
Add a simple AppResponseMessage to this list.

The argument satisfies the same conditions as AppResponseMessage.forSimple(java.lang.String).

Specified by:
add in interface MessageList

add

public final void add(String aMessage,
                      Object... aParams)
Description copied from interface: MessageList
Add a compound AppResponseMessage to this list.

The arguments satisfy the same conditions as AppResponseMessage.forCompound(java.lang.String, java.lang.Object...).

Specified by:
add in interface MessageList

add

public final void add(AppException ex)
Description copied from interface: MessageList
Add all AppResponseMessages attached to aAppEx to this list.

Specified by:
add in interface MessageList

getMessages

public final List<AppResponseMessage> getMessages()
Description copied from interface: MessageList
Return an unmodifiable List of AppResponseMessages.

Specified by:
getMessages in interface MessageList

isNotEmpty

public final boolean isNotEmpty()
Description copied from interface: MessageList
Return the negation of MessageList.isEmpty().

Specified by:
isNotEmpty in interface MessageList

isEmpty

public final boolean isEmpty()
Description copied from interface: MessageList
Return true only if there are no messages in this list.

Note that this method name conflicts with the empty keyword of JSTL. Thus, MessageList.isNotEmpty() is supplied as an alternative.

Specified by:
isEmpty in interface MessageList

toString

public String toString()
Intended for debugging only.

Overrides:
toString in class Object

Version 4.10.0

Copyright Hirondelle Systems. Published October 19, 2013 - User Guide - All Docs.