Coverage Report - org.simpleframework.xml.core.ContactMap
 
Classes in this File Line Coverage Branch Coverage Complexity
ContactMap
100%
2/2
N/A
1
 
 1  
 /*
 2  
  * ContactMap.java January 2010
 3  
  *
 4  
  * Copyright (C) 2010, Niall Gallagher <niallg@users.sf.net>
 5  
  *
 6  
  * Licensed under the Apache License, Version 2.0 (the "License");
 7  
  * you may not use this file except in compliance with the License.
 8  
  * You may obtain a copy of the License at
 9  
  *
 10  
  *     http://www.apache.org/licenses/LICENSE-2.0
 11  
  *
 12  
  * Unless required by applicable law or agreed to in writing, software
 13  
  * distributed under the License is distributed on an "AS IS" BASIS,
 14  
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 
 15  
  * implied. See the License for the specific language governing 
 16  
  * permissions and limitations under the License.
 17  
  */
 18  
 
 19  
 package org.simpleframework.xml.core;
 20  
 
 21  
 import java.util.Iterator;
 22  
 import java.util.LinkedHashMap;
 23  
 
 24  
 /**
 25  
  * The <code>ContactMap</code> object is used to keep track of the
 26  
  * contacts that have been processed. Keeping track of the contacts
 27  
  * that have been processed ensures that no two contacts are used
 28  
  * twice. This ensures a consistent XML class schema.
 29  
  * 
 30  
  * @author Niall Gallagher
 31  
  */
 32  3393
 class ContactMap extends LinkedHashMap<Object, Contact> implements Iterable<Contact> {
 33  
    
 34  
    /**
 35  
     * This is used to iterate over the <code>Contact</code> objects
 36  
     * in a for each loop. Iterating over the contacts allows them
 37  
     * to be easily added to a list of unique contacts.
 38  
     * 
 39  
     * @return this is used to return the contacts registered
 40  
     */
 41  
    public Iterator<Contact> iterator(){
 42  3393
       return values().iterator();
 43  
    }
 44  
    
 45  
 }