Class 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>
    The ContactMap 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.
    • Nested Class Summary

      • Nested classes/interfaces inherited from class java.util.AbstractMap

        java.util.AbstractMap.SimpleEntry<K extends java.lang.Object,​V extends java.lang.Object>, java.util.AbstractMap.SimpleImmutableEntry<K extends java.lang.Object,​V extends java.lang.Object>
    • 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 the Contact 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
      • Methods inherited from class java.util.AbstractMap

        equals, hashCode, toString
      • Methods inherited from class java.lang.Object

        finalize, getClass, notify, notifyAll, wait, wait, wait
      • Methods inherited from interface java.lang.Iterable

        forEach, spliterator
      • Methods inherited from interface java.util.Map

        compute, computeIfAbsent, computeIfPresent, containsKey, equals, hashCode, isEmpty, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, size
    • Constructor Detail

      • ContactMap

        ContactMap()
    • Method Detail

      • iterator

        public java.util.Iterator<Contact> iterator()
        This is used to iterate over the Contact 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 interface java.lang.Iterable<Contact>
        Returns:
        this is used to return the contacts registered