Coverage Report - org.seasar.teeda.core.render.html.support.UrlParameter
 
Classes in this File Line Coverage Branch Coverage Complexity
UrlParameter
100%
15/15
100%
2/2
1.286
 
 1  
 /*
 2  
  * Copyright 2004-2011 the Seasar Foundation and the Others.
 3  
  *
 4  
  * Licensed under the Apache License, Version 2.0 (the "License");
 5  
  * you may not use this file except in compliance with the License.
 6  
  * You may obtain a copy of the License at
 7  
  *
 8  
  *     http://www.apache.org/licenses/LICENSE-2.0
 9  
  *
 10  
  * Unless required by applicable law or agreed to in writing, software
 11  
  * distributed under the License is distributed on an "AS IS" BASIS,
 12  
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
 13  
  * either express or implied. See the License for the specific language
 14  
  * governing permissions and limitations under the License.
 15  
  */
 16  
 package org.seasar.teeda.core.render.html.support;
 17  
 
 18  
 import org.seasar.framework.util.ArrayUtil;
 19  
 
 20  
 /**
 21  
  * @author manhole
 22  
  */
 23  49
 public class UrlParameter {
 24  
 
 25  
     private String key;
 26  
 
 27  49
     private String[] values = {};
 28  
 
 29  
     public String getKey() {
 30  20
         return key;
 31  
     }
 32  
 
 33  
     public void setKey(String key) {
 34  46
         this.key = key;
 35  46
     }
 36  
 
 37  
     public String getValue() {
 38  6
         if (ArrayUtil.isEmpty(values)) {
 39  1
             return "";
 40  
         }
 41  5
         return values[0];
 42  
     }
 43  
 
 44  
     public void setValue(String value) {
 45  1
         values = new String[] { value };
 46  1
     }
 47  
 
 48  
     public void addValue(String value) {
 49  56
         this.values = (String[]) ArrayUtil.add(this.values, value);
 50  56
     }
 51  
 
 52  
     public String[] getValues() {
 53  42
         return values;
 54  
     }
 55  
 
 56  
     public void setValues(String[] values) {
 57  1
         this.values = values;
 58  1
     }
 59  
 
 60  
 }