Coverage Report - org.apache.tapestry5.internal.SelectModelImpl
 
Classes in this File Line Coverage Branch Coverage Complexity
SelectModelImpl
60%
6/10
N/A
0
 
 1  
 // Copyright 2007 The Apache Software Foundation
 2  
 //
 3  
 // Licensed under the Apache License, Version 2.0 (the "License");
 4  
 // you may not use this file except in compliance with the License.
 5  
 // You may obtain a copy of the License at
 6  
 //
 7  
 //     http://www.apache.org/licenses/LICENSE-2.0
 8  
 //
 9  
 // Unless required by applicable law or agreed to in writing, software
 10  
 // distributed under the License is distributed on an "AS IS" BASIS,
 11  
 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 12  
 // See the License for the specific language governing permissions and
 13  
 // limitations under the License.
 14  
 
 15  
 package org.apache.tapestry5.internal;
 16  
 
 17  
 import org.apache.tapestry5.OptionGroupModel;
 18  
 import org.apache.tapestry5.OptionModel;
 19  
 import org.apache.tapestry5.util.AbstractSelectModel;
 20  
 
 21  
 import java.util.Arrays;
 22  
 import java.util.List;
 23  
 
 24  
 public final class SelectModelImpl extends AbstractSelectModel
 25  
 {
 26  
     private final List<OptionGroupModel> optionGroups;
 27  
 
 28  
     private final List<OptionModel> optionModels;
 29  
 
 30  
     public SelectModelImpl(final List<OptionGroupModel> optionGroups,
 31  
                            final List<OptionModel> optionModels)
 32  37
     {
 33  37
         this.optionGroups = optionGroups;
 34  37
         this.optionModels = optionModels;
 35  37
     }
 36  
 
 37  
     public SelectModelImpl(OptionModel... optionModels)
 38  
     {
 39  0
         this(null, Arrays.asList(optionModels));
 40  0
     }
 41  
 
 42  
     public SelectModelImpl(OptionGroupModel... groupModels)
 43  
     {
 44  0
         this(Arrays.asList(groupModels), null);
 45  0
     }
 46  
 
 47  
     public List<OptionGroupModel> getOptionGroups()
 48  
     {
 49  44
         return optionGroups;
 50  
     }
 51  
 
 52  
     public List<OptionModel> getOptions()
 53  
     {
 54  44
         return optionModels;
 55  
     }
 56  
 
 57  
 }