Class SynchronizedRedBlackTree<T extends SimTime<?,​?,​T>>

    • Constructor Detail

      • SynchronizedRedBlackTree

        public SynchronizedRedBlackTree()
        Constructs a new SynchronizedRedBlackTree.
    • Method Detail

      • first

        public SimEventInterface<T> first()
        we re-implemented the first method. Instead of throwing exceptions if the tree is empty, we return a null value.
        Specified by:
        first in interface java.util.SortedSet<T extends SimTime<?,​?,​T>>
        Returns:
        the first SimEvent in the tree.
        See Also:
        TreeSet.first()
      • last

        public SimEventInterface<T> last()
        we re-implemented the last method. Instead of throwing exceptions if the tree is empty, we return a null value.
        Specified by:
        last in interface java.util.SortedSet<T extends SimTime<?,​?,​T>>
        Returns:
        the last SimEvent in the tree.
        See Also:
        TreeSet.last()
      • comparator

        public java.util.Comparator<? super SimEventInterface<T>> comparator()
        Specified by:
        comparator in interface java.util.SortedSet<T extends SimTime<?,​?,​T>>
      • size

        public int size()
        Specified by:
        size in interface java.util.Collection<T extends SimTime<?,​?,​T>>
        Specified by:
        size in interface java.util.Set<T extends SimTime<?,​?,​T>>
      • isEmpty

        public boolean isEmpty()
        Specified by:
        isEmpty in interface java.util.Collection<T extends SimTime<?,​?,​T>>
        Specified by:
        isEmpty in interface java.util.Set<T extends SimTime<?,​?,​T>>
      • contains

        public boolean contains​(java.lang.Object o)
        Specified by:
        contains in interface java.util.Collection<T extends SimTime<?,​?,​T>>
        Specified by:
        contains in interface java.util.Set<T extends SimTime<?,​?,​T>>
      • iterator

        public java.util.Iterator<SimEventInterface<T>> iterator()
        Specified by:
        iterator in interface java.util.Collection<T extends SimTime<?,​?,​T>>
        Specified by:
        iterator in interface java.lang.Iterable<T extends SimTime<?,​?,​T>>
        Specified by:
        iterator in interface java.util.Set<T extends SimTime<?,​?,​T>>
      • toArray

        public java.lang.Object[] toArray()
        Specified by:
        toArray in interface java.util.Collection<T extends SimTime<?,​?,​T>>
        Specified by:
        toArray in interface java.util.Set<T extends SimTime<?,​?,​T>>
      • toArray

        public <X> X[] toArray​(X[] a)
        Specified by:
        toArray in interface java.util.Collection<T extends SimTime<?,​?,​T>>
        Specified by:
        toArray in interface java.util.Set<T extends SimTime<?,​?,​T>>
      • add

        public boolean add​(SimEventInterface<T> e)
        Specified by:
        add in interface java.util.Collection<T extends SimTime<?,​?,​T>>
        Specified by:
        add in interface java.util.Set<T extends SimTime<?,​?,​T>>
      • remove

        public boolean remove​(java.lang.Object o)
        Specified by:
        remove in interface java.util.Collection<T extends SimTime<?,​?,​T>>
        Specified by:
        remove in interface java.util.Set<T extends SimTime<?,​?,​T>>
      • containsAll

        public boolean containsAll​(java.util.Collection<?> c)
        Specified by:
        containsAll in interface java.util.Collection<T extends SimTime<?,​?,​T>>
        Specified by:
        containsAll in interface java.util.Set<T extends SimTime<?,​?,​T>>
      • addAll

        public boolean addAll​(java.util.Collection<? extends SimEventInterface<T>> c)
        Specified by:
        addAll in interface java.util.Collection<T extends SimTime<?,​?,​T>>
        Specified by:
        addAll in interface java.util.Set<T extends SimTime<?,​?,​T>>
      • retainAll

        public boolean retainAll​(java.util.Collection<?> c)
        Specified by:
        retainAll in interface java.util.Collection<T extends SimTime<?,​?,​T>>
        Specified by:
        retainAll in interface java.util.Set<T extends SimTime<?,​?,​T>>
      • removeAll

        public boolean removeAll​(java.util.Collection<?> c)
        Specified by:
        removeAll in interface java.util.Collection<T extends SimTime<?,​?,​T>>
        Specified by:
        removeAll in interface java.util.Set<T extends SimTime<?,​?,​T>>
      • clear

        public void clear()
        Specified by:
        clear in interface java.util.Collection<T extends SimTime<?,​?,​T>>
        Specified by:
        clear in interface java.util.Set<T extends SimTime<?,​?,​T>>
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object