Class EntrySet<K,​V>

  • All Implemented Interfaces:
    java.lang.Iterable<java.util.Map.Entry<K,​V>>, java.util.Collection<java.util.Map.Entry<K,​V>>, java.util.List<java.util.Map.Entry<K,​V>>, java.util.Set<java.util.Map.Entry<K,​V>>, EntryList<K,​V>, Paired<K,​V>
    Direct Known Subclasses:
    EntrySet.KeyedPrimitives, EntrySet.ObjectObject

    public abstract class EntrySet<K,​V>
    extends java.util.AbstractList<java.util.Map.Entry<K,​V>>
    implements EntryList<K,​V>, java.util.Set<java.util.Map.Entry<K,​V>>
    Allows you to wrap and treat two arrays as a Collection of key-value pairs. Implements both List and Set but does not in any way test or enforce uniqueness – that's up to the user of this class.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private K[] myKeys  
      • Fields inherited from class java.util.AbstractList

        modCount
    • Constructor Summary

      Constructors 
      Constructor Description
      EntrySet​(K[] keys)  
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      abstract EntryPair<K,​V> get​(int index)  
      K getKey​(int index)  
      EntryPair<K,​V> getPair​(int index)  
      abstract V getValue​(int index)  
      java.util.Iterator<java.util.Map.Entry<K,​V>> iterator()  
      abstract void setValue​(int index, V value)  
      int size()  
      java.util.Spliterator<java.util.Map.Entry<K,​V>> spliterator()  
      • Methods inherited from class java.util.AbstractList

        add, add, addAll, clear, equals, hashCode, indexOf, lastIndexOf, listIterator, listIterator, remove, removeRange, set, subList
      • Methods inherited from class java.util.AbstractCollection

        addAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray, toString
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
      • Methods inherited from interface java.util.Collection

        parallelStream, removeIf, stream, toArray
      • Methods inherited from interface java.lang.Iterable

        forEach
      • Methods inherited from interface java.util.List

        add, add, addAll, addAll, clear, contains, containsAll, equals, hashCode, indexOf, isEmpty, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, replaceAll, retainAll, set, sort, subList, toArray, toArray
      • Methods inherited from interface java.util.Set

        add, addAll, clear, contains, containsAll, equals, hashCode, isEmpty, remove, removeAll, retainAll, toArray, toArray
    • Field Detail

      • myKeys

        private final K[] myKeys
    • Constructor Detail

      • EntrySet

        EntrySet​(K[] keys)
    • Method Detail

      • get

        public abstract EntryPair<K,​V> get​(int index)
        Specified by:
        get in interface java.util.List<K>
        Specified by:
        get in class java.util.AbstractList<java.util.Map.Entry<K,​V>>
      • getKey

        public final K getKey​(int index)
        Specified by:
        getKey in interface Paired<K,​V>
      • getValue

        public abstract V getValue​(int index)
        Specified by:
        getValue in interface Paired<K,​V>
      • iterator

        public final java.util.Iterator<java.util.Map.Entry<K,​V>> iterator()
        Specified by:
        iterator in interface java.util.Collection<K>
        Specified by:
        iterator in interface java.lang.Iterable<K>
        Specified by:
        iterator in interface java.util.List<K>
        Specified by:
        iterator in interface java.util.Set<K>
        Overrides:
        iterator in class java.util.AbstractList<java.util.Map.Entry<K,​V>>
      • setValue

        public abstract void setValue​(int index,
                                      V value)
      • size

        public final int size()
        Specified by:
        size in interface java.util.Collection<K>
        Specified by:
        size in interface java.util.List<K>
        Specified by:
        size in interface java.util.Set<K>
        Specified by:
        size in class java.util.AbstractCollection<java.util.Map.Entry<K,​V>>
      • spliterator

        public java.util.Spliterator<java.util.Map.Entry<K,​V>> spliterator()
        Specified by:
        spliterator in interface java.util.Collection<K>
        Specified by:
        spliterator in interface java.lang.Iterable<K>
        Specified by:
        spliterator in interface java.util.List<K>
        Specified by:
        spliterator in interface java.util.Set<K>