2009/05/20 - Apache Shale has been retired.

For more information, please explore the Attic.

Coverage Report - org.apache.shale.tiger.managed.config.MapEntriesConfig
 
Classes in this File Line Coverage Branch Coverage Complexity
MapEntriesConfig
100%
16/16
N/A
0
 
 1  
 /*
 2  
  * Licensed to the Apache Software Foundation (ASF) under one or more
 3  
  * contributor license agreements.  See the NOTICE file distributed with
 4  
  * this work for additional information regarding copyright ownership.
 5  
  * The ASF licenses this file to you under the Apache License, Version 2.0
 6  
  * (the "License"); you may not use this file except in compliance with
 7  
  * the License.  You may obtain a copy of the License at
 8  
  *
 9  
  *      http://www.apache.org/licenses/LICENSE-2.0
 10  
  *
 11  
  * Unless required by applicable law or agreed to in writing, software
 12  
  * distributed under the License is distributed on an "AS IS" BASIS,
 13  
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 14  
  * See the License for the specific language governing permissions and
 15  
  * limitations under the License.
 16  
  */
 17  
 
 18  
 package org.apache.shale.tiger.managed.config;
 19  
 
 20  
 import java.util.ArrayList;
 21  
 import java.util.List;
 22  
 
 23  
 /**
 24  
  * <p>Representation of the runtime relevant contents of a JavaServer Faces
 25  
  * <code>&lt;map-entries&gt;</code> configuration element.</p>
 26  
  */
 27  
 public class MapEntriesConfig {
 28  
 
 29  
     /** Creates a new instance of MapEntriesConfig. */
 30  9
     public MapEntriesConfig() {
 31  9
     }
 32  
 
 33  
     /**
 34  
      * Holds value of property keyType.
 35  
      */
 36  
     private String keyType;
 37  
 
 38  
     /**
 39  
      * Getter for property keyType.
 40  
      * @return Value of property keyType.
 41  
      */
 42  
     public String getKeyType() {
 43  
 
 44  6
         return this.keyType;
 45  
     }
 46  
 
 47  
     /**
 48  
      * Setter for property keyType.
 49  
      * @param keyType New value of property keyType.
 50  
      */
 51  
     public void setKeyType(String keyType) {
 52  
 
 53  3
         this.keyType = keyType;
 54  3
     }
 55  
 
 56  
     /**
 57  
      * Holds value of property valueType.
 58  
      */
 59  
     private String valueType;
 60  
 
 61  
     /**
 62  
      * Getter for property valueType.
 63  
      * @return Value of property valueType.
 64  
      */
 65  
     public String getValueType() {
 66  
 
 67  6
         return this.valueType;
 68  
     }
 69  
 
 70  
     /**
 71  
      * Setter for property valueType.
 72  
      * @param valueType New value of property valueType.
 73  
      */
 74  
     public void setValueType(String valueType) {
 75  
 
 76  3
         this.valueType = valueType;
 77  3
     }
 78  
 
 79  
 
 80  
     /**
 81  
      * <p><code>List</code> of map entry configurations for this
 82  
      * map entries configuration.</p>
 83  
      */
 84  9
     private List<MapEntryConfig> entries = new ArrayList<MapEntryConfig>();
 85  
 
 86  
 
 87  
     /**
 88  
      * <p>Add a map entry configuration to the list for this
 89  
      * map entries configuration.</p>
 90  
      *
 91  
      * @param entry The map entry configuration to add
 92  
      */
 93  
     public void addEntry(MapEntryConfig entry) {
 94  30
         this.entries.add(entry);
 95  30
     }
 96  
 
 97  
 
 98  
     /**
 99  
      * <p>Return the list of map entry configurations for this
 100  
      * map entries configuration.</p>
 101  
      */
 102  
     public List<MapEntryConfig> getEntries() {
 103  16
         return this.entries;
 104  
     }
 105  
 
 106  
 
 107  
     /**
 108  
      * <p>REturn the map entry configuration for the specified key, if any;
 109  
      * otherwise, return <code>null</code>.</p>
 110  
      *
 111  
      * @param key Key for which to return a map entry configuration
 112  
      */
 113  
     public MapEntryConfig getEntry(String key) {
 114  30
         for (MapEntryConfig entry : entries) {
 115  36
             if (key.equals(entry.getKey())) {
 116  
                 return entry;
 117  
             }
 118  36
         }
 119  30
         return null;
 120  
     }
 121  
 
 122  
 
 123  
 }