Class IdentifiableContainerBase<E extends Identifiable>

  • All Implemented Interfaces:
    java.lang.Iterable<E>, java.util.Collection<E>, java.util.List<E>
    Direct Known Subclasses:
    IORImpl, IORTemplateImpl, TaggedProfileTemplateBase

    public class IdentifiableContainerBase<E extends Identifiable>
    extends FreezableList<E>
    Convenience class for defining objects that contain lists of Identifiables. Mainly implements iteratorById. Also note that the constructor creates the list, which here is always an ArrayList, as this is much more efficient overall for short lists.
    • Field Summary

      • Fields inherited from class java.util.AbstractList

        modCount
    • Constructor Summary

      Constructors 
      Constructor Description
      IdentifiableContainerBase()
      Create this class with an empty list of identifiables.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.Iterator<E> iteratorById​(int id)
      Return an iterator which iterates over all contained Identifiables with type given by id.
      • Methods inherited from class java.util.AbstractList

        add, addAll, clear, indexOf, iterator, lastIndexOf, listIterator, listIterator, removeRange
      • 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
      • Methods inherited from interface java.lang.Iterable

        forEach
      • Methods inherited from interface java.util.List

        addAll, contains, containsAll, isEmpty, remove, removeAll, replaceAll, retainAll, sort, spliterator, toArray, toArray
    • Constructor Detail

      • IdentifiableContainerBase

        public IdentifiableContainerBase()
        Create this class with an empty list of identifiables. The current implementation uses an ArrayList.
    • Method Detail

      • iteratorById

        public java.util.Iterator<E> iteratorById​(int id)
        Return an iterator which iterates over all contained Identifiables with type given by id.
        Parameters:
        id - id of type
        Returns:
        Iterator of contained Identifiables