Class ClassInheritanceMultiMap<T>

  • All Implemented Interfaces:
    java.lang.Iterable<T>, java.util.Collection<T>

    public class ClassInheritanceMultiMap<T>
    extends java.util.AbstractCollection<T>
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.util.List<T> allInstances  
      private java.lang.Class<T> baseClass  
      private java.util.Map<java.lang.Class<?>,​java.util.List<T>> byClass  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean add​(T p_add_1_)  
      boolean contains​(java.lang.Object p_contains_1_)  
      <S> java.util.Collection<S> find​(java.lang.Class<S> p_219790_1_)  
      java.util.List<T> getAllInstances()  
      java.util.Iterator<T> iterator()  
      boolean remove​(java.lang.Object p_remove_1_)  
      int size()  
      • Methods inherited from class java.util.AbstractCollection

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

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

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

        forEach
    • Field Detail

      • byClass

        private final java.util.Map<java.lang.Class<?>,​java.util.List<T>> byClass
      • baseClass

        private final java.lang.Class<T> baseClass
      • allInstances

        private final java.util.List<T> allInstances
    • Constructor Detail

      • ClassInheritanceMultiMap

        public ClassInheritanceMultiMap​(java.lang.Class<T> p_i45909_1_)
    • Method Detail

      • add

        public boolean add​(T p_add_1_)
        Specified by:
        add in interface java.util.Collection<T>
        Overrides:
        add in class java.util.AbstractCollection<T>
      • remove

        public boolean remove​(java.lang.Object p_remove_1_)
        Specified by:
        remove in interface java.util.Collection<T>
        Overrides:
        remove in class java.util.AbstractCollection<T>
      • contains

        public boolean contains​(java.lang.Object p_contains_1_)
        Specified by:
        contains in interface java.util.Collection<T>
        Overrides:
        contains in class java.util.AbstractCollection<T>
      • find

        public <S> java.util.Collection<S> find​(java.lang.Class<S> p_219790_1_)
      • iterator

        public java.util.Iterator<T> iterator()
        Specified by:
        iterator in interface java.util.Collection<T>
        Specified by:
        iterator in interface java.lang.Iterable<T>
        Specified by:
        iterator in class java.util.AbstractCollection<T>
      • getAllInstances

        public java.util.List<T> getAllInstances()
      • size

        public int size()
        Specified by:
        size in interface java.util.Collection<T>
        Specified by:
        size in class java.util.AbstractCollection<T>