Package org.geotools.util
Class PartiallyOrderedSet<E>
- Object
-
- AbstractCollection<E>
-
- AbstractSet<E>
-
- 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 callingsetOrder(Object, Object)
- Author:
- Andrea Aime
-
-
Constructor Summary
Constructors Constructor Description PartiallyOrderedSet()
PartiallyOrderedSet(boolean throwOnCycle)
-
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 interface Collection
parallelStream, removeIf, stream, toArray
-
Methods inherited from interface Set
addAll, clear, contains, containsAll, isEmpty, retainAll, spliterator, toArray, toArray
-
-
-
-
Method Detail
-
add
public boolean add(E e)
- Specified by:
add
in interfaceCollection<E>
- Specified by:
add
in interfaceSet<E>
- Overrides:
add
in classAbstractCollection<E>
-
remove
public boolean remove(Object o)
- Specified by:
remove
in interfaceCollection<E>
- Specified by:
remove
in interfaceSet<E>
- Overrides:
remove
in classAbstractCollection<E>
-
size
public int size()
- Specified by:
size
in interfaceCollection<E>
- Specified by:
size
in interfaceSet<E>
- Specified by:
size
in classAbstractCollection<E>
-
-