Class PartiallyOrderedSet<E>

  • All Implemented Interfaces:
    Iterable<E>, Collection<E>, Set<E>

    public class PartiallyOrderedSet<E>
    extends AbstractSet<E>
    Set of elements having a partial order, established by setting before/after relationship calling setOrder(Object, Object)
    Author:
    Andrea Aime
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean add​(E e)  
      boolean clearOrder​(E source, E target)  
      Iterator<E> iterator()  
      boolean remove​(Object o)  
      boolean setOrder​(E source, E target)  
      int size()  
      • Methods inherited from class AbstractSet

        equals, hashCode, removeAll
      • Methods inherited from class AbstractCollection

        addAll, clear, contains, containsAll, isEmpty, retainAll, toArray, toArray, toString
      • Methods inherited from class Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
      • Methods inherited from interface Collection

        parallelStream, removeIf, stream, toArray
      • Methods inherited from interface Iterable

        forEach
      • Methods inherited from interface Set

        addAll, clear, contains, containsAll, isEmpty, retainAll, spliterator, toArray, toArray
    • Constructor Detail

      • PartiallyOrderedSet

        public PartiallyOrderedSet​(boolean throwOnCycle)
      • PartiallyOrderedSet

        public PartiallyOrderedSet()
    • Method Detail

      • add

        public boolean add​(E e)
        Specified by:
        add in interface Collection<E>
        Specified by:
        add in interface Set<E>
        Overrides:
        add in class AbstractCollection<E>
      • remove

        public boolean remove​(Object o)
        Specified by:
        remove in interface Collection<E>
        Specified by:
        remove in interface Set<E>
        Overrides:
        remove in class AbstractCollection<E>
      • setOrder

        public boolean setOrder​(E source,
                                E target)
      • clearOrder

        public boolean clearOrder​(E source,
                                  E target)
      • iterator

        public Iterator<E> iterator()
        Specified by:
        iterator in interface Collection<E>
        Specified by:
        iterator in interface Iterable<E>
        Specified by:
        iterator in interface Set<E>
        Specified by:
        iterator in class AbstractCollection<E>
      • size

        public int size()
        Specified by:
        size in interface Collection<E>
        Specified by:
        size in interface Set<E>
        Specified by:
        size in class AbstractCollection<E>