Class ListenerCollection<T>

    • Method Detail

      • add

        public boolean add​(T listener)
        Adds a listener to this set of listeners.
        Parameters:
        listener - The listener to add
        Returns:
        true if the listener was added
      • remove

        public void remove​(T listener)
        Removes a listener from this set.
        Parameters:
        listener - The listener to remove
      • isAllowingDuplicates

        protected boolean isAllowingDuplicates()
        Whether or not added listeners should be checked for duplicates.
        Returns:
        true to ignore duplicates
      • isAllowingNulls

        protected boolean isAllowingNulls()
        Whether or not to allow nulls in listener collection.
        Returns:
        true to allow nulls to be added to the collection
      • iterator

        public Iterator<Titerator()
        Returns an iterator that can iterate the listeners.
        Specified by:
        iterator in interface Iterable<T>
        Returns:
        an iterator that can iterate the listeners.