Package org.simpleframework.xml.core
Class ContactMap
- java.lang.Object
-
- java.util.AbstractMap<K,V>
-
- java.util.HashMap<K,V>
-
- java.util.LinkedHashMap<java.lang.Object,Contact>
-
- org.simpleframework.xml.core.ContactMap
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Cloneable
,java.lang.Iterable<Contact>
,java.util.Map<java.lang.Object,Contact>
class ContactMap extends java.util.LinkedHashMap<java.lang.Object,Contact> implements java.lang.Iterable<Contact>
TheContactMap
object is used to keep track of the contacts that have been processed. Keeping track of the contacts that have been processed ensures that no two contacts are used twice. This ensures a consistent XML class schema.
-
-
Constructor Summary
Constructors Constructor Description ContactMap()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Iterator<Contact>
iterator()
This is used to iterate over theContact
objects in a for each loop.-
Methods inherited from class java.util.LinkedHashMap
clear, containsValue, entrySet, forEach, get, getOrDefault, keySet, removeEldestEntry, replaceAll, values
-
Methods inherited from class java.util.HashMap
clone, compute, computeIfAbsent, computeIfPresent, containsKey, isEmpty, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, size
-
-
-
-
Method Detail
-
iterator
public java.util.Iterator<Contact> iterator()
This is used to iterate over theContact
objects in a for each loop. Iterating over the contacts allows them to be easily added to a list of unique contacts.- Specified by:
iterator
in interfacejava.lang.Iterable<Contact>
- Returns:
- this is used to return the contacts registered
-
-