View Javadoc

1   /*
2    * $Id: AbstractMessageSequence.java 22272 2011-06-27 16:17:16Z mike.schilling $
3    * --------------------------------------------------------------------------------------
4    * Copyright (c) MuleSoft, Inc.  All rights reserved.  http://www.mulesoft.com
5    *
6    * The software in this package is published under the terms of the CPAL v1.0
7    * license, a copy of which has been included with this distribution in the
8    * LICENSE.txt file.
9    */
10  
11  package org.mule.routing;
12  
13  /**
14   * An abstract implementation of a {@link MessageSequence}, that does not support
15   * {@link #remove()}
16   * 
17   * @author flbulgarelli
18   * @param <PayloadType>
19   */
20  public abstract class AbstractMessageSequence<PayloadType> implements MessageSequence<PayloadType>
21  {
22      public final boolean isEmpty()
23      {
24          return !hasNext();
25      }
26  
27      public final void remove()
28      {
29          throw new UnsupportedOperationException();
30      }
31  }