Class OrderedSet<T>

    • Constructor Detail

      • OrderedSet

        public OrderedSet()
        Construct an empty collection.
      • OrderedSet

        public OrderedSet​(Collection<T> c)
        Construct an ordered set from the given collection.
    • Method Detail

      • add

        public boolean add​(T o)
        Add the given object to the Set if it is not equal (equals()) to an element already in the set.
        Specified by:
        add in interface Collection<T>
        Specified by:
        add in interface List<T>
        Specified by:
        add in interface Set<T>
        Overrides:
        add in class Vector<T>
      • addAll

        public boolean addAll​(Collection<? extends T> c)
        Add all the elements in the given set that are not already in this ordered set.
        Specified by:
        addAll in interface Collection<T>
        Specified by:
        addAll in interface List<T>
        Specified by:
        addAll in interface Set<T>
        Overrides:
        addAll in class Vector<T>