Coverage Report - org.mule.util.queue.QueueConfiguration
 
Classes in this File Line Coverage Branch Coverage Complexity
QueueConfiguration
0%
0/33
0%
0/12
0
 
 1  
 /*
 2  
  * Copyright (c) MuleSoft, Inc.  All rights reserved.  http://www.mulesoft.com
 3  
  * The software in this package is published under the terms of the CPAL v1.0
 4  
  * license, a copy of which has been included with this distribution in the
 5  
  * LICENSE.txt file.
 6  
  */
 7  
 package org.mule.util.queue;
 8  
 
 9  
 public class QueueConfiguration
 10  
 {
 11  
 
 12  
     protected int capacity;
 13  
     protected boolean persistent;
 14  
 
 15  
     public QueueConfiguration(int capacity, boolean persistent)
 16  0
     {
 17  0
         this.capacity = capacity;
 18  0
         this.persistent = persistent;
 19  0
     }
 20  
 
 21  
     public QueueConfiguration(int capacity)
 22  
     {
 23  0
         this(capacity, false);
 24  0
     }
 25  
 
 26  
     public QueueConfiguration(boolean persistent)
 27  
     {
 28  0
         this(0, persistent);
 29  0
     }
 30  
 
 31  
     public QueueConfiguration()
 32  
     {
 33  0
         this(0, false);
 34  0
     }
 35  
 
 36  
     /**
 37  
      * @return Returns the capacity.
 38  
      */
 39  
     public int getCapacity()
 40  
     {
 41  0
         return capacity;
 42  
     }
 43  
 
 44  
     /**
 45  
      * @param capacity The capacity to set.
 46  
      */
 47  
     public void setCapacity(int capacity)
 48  
     {
 49  0
         this.capacity = capacity;
 50  0
     }
 51  
 
 52  
     /**
 53  
      * @return Returns the persistent.
 54  
      */
 55  
     public boolean isPersistent()
 56  
     {
 57  0
         return persistent;
 58  
     }
 59  
 
 60  
     /**
 61  
      * @param persistent The persistent to set.
 62  
      */
 63  
     public void setPersistent(boolean persistent)
 64  
     {
 65  0
         this.persistent = persistent;
 66  0
     }
 67  
 
 68  
     @Override
 69  
     public int hashCode()
 70  
     {
 71  0
         final int prime = 31;
 72  0
         int result = 1;
 73  0
         result = prime * result + capacity;
 74  0
         result = prime * result + (persistent ? 1231 : 1237);
 75  0
         return result;
 76  
     }
 77  
 
 78  
     @Override
 79  
     public boolean equals(Object obj)
 80  
     {
 81  0
         if (this == obj)
 82  
         {
 83  0
             return true;
 84  
         }
 85  0
         if (obj == null)
 86  
         {
 87  0
             return false;
 88  
         }
 89  0
         if (getClass() != obj.getClass())
 90  
         {
 91  0
             return false;
 92  
         }
 93  0
         QueueConfiguration other = (QueueConfiguration) obj;
 94  0
         if (capacity != other.capacity)
 95  
         {
 96  0
             return false;
 97  
         }
 98  0
         if (persistent != other.persistent)
 99  
         {
 100  0
             return false;
 101  
         }
 102  0
         return true;
 103  
     }
 104  
     
 105  
 }