Class TraverserSet<S>
- java.lang.Object
-
- java.util.AbstractCollection<E>
-
- java.util.AbstractSet<Traverser.Admin<S>>
-
- org.apache.tinkerpop.gremlin.process.traversal.traverser.util.TraverserSet<S>
-
- All Implemented Interfaces:
Serializable
,Iterable<Traverser.Admin<S>>
,Collection<Traverser.Admin<S>>
,Queue<Traverser.Admin<S>>
,Set<Traverser.Admin<S>>
- Direct Known Subclasses:
IndexedTraverserSet
public class TraverserSet<S> extends AbstractSet<Traverser.Admin<S>> implements Set<Traverser.Admin<S>>, Queue<Traverser.Admin<S>>, Serializable
- Author:
- Marko A. Rodriguez (http://markorodriguez.com)
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description TraverserSet()
TraverserSet(Traverser.Admin<S> traverser)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
add(Traverser.Admin<S> traverser)
long
bulkSize()
void
clear()
boolean
contains(Object traverser)
Traverser.Admin<S>
element()
Traverser.Admin<S>
get(Traverser.Admin<S> traverser)
boolean
isEmpty()
Iterator<Traverser.Admin<S>>
iterator()
boolean
offer(Traverser.Admin<S> traverser)
Traverser.Admin<S>
peek()
Traverser.Admin<S>
poll()
Traverser.Admin<S>
remove()
boolean
remove(Object traverser)
void
shuffle(Random random)
int
size()
void
sort(Comparator<Traverser<S>> comparator)
Spliterator<Traverser.Admin<S>>
spliterator()
String
toString()
-
Methods inherited from class java.util.AbstractSet
equals, hashCode, removeAll
-
Methods inherited from class java.util.AbstractCollection
addAll, containsAll, retainAll, toArray, toArray
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArray
-
-
-
-
Constructor Detail
-
TraverserSet
public TraverserSet()
-
TraverserSet
public TraverserSet(Traverser.Admin<S> traverser)
-
-
Method Detail
-
iterator
public Iterator<Traverser.Admin<S>> iterator()
- Specified by:
iterator
in interfaceCollection<S>
- Specified by:
iterator
in interfaceIterable<S>
- Specified by:
iterator
in interfaceSet<S>
- Specified by:
iterator
in classAbstractCollection<Traverser.Admin<S>>
-
get
public Traverser.Admin<S> get(Traverser.Admin<S> traverser)
-
size
public int size()
- Specified by:
size
in interfaceCollection<S>
- Specified by:
size
in interfaceSet<S>
- Specified by:
size
in classAbstractCollection<Traverser.Admin<S>>
-
bulkSize
public long bulkSize()
-
isEmpty
public boolean isEmpty()
- Specified by:
isEmpty
in interfaceCollection<S>
- Specified by:
isEmpty
in interfaceSet<S>
- Overrides:
isEmpty
in classAbstractCollection<Traverser.Admin<S>>
-
contains
public boolean contains(Object traverser)
- Specified by:
contains
in interfaceCollection<S>
- Specified by:
contains
in interfaceSet<S>
- Overrides:
contains
in classAbstractCollection<Traverser.Admin<S>>
-
add
public boolean add(Traverser.Admin<S> traverser)
- Specified by:
add
in interfaceCollection<S>
- Specified by:
add
in interfaceQueue<S>
- Specified by:
add
in interfaceSet<S>
- Overrides:
add
in classAbstractCollection<Traverser.Admin<S>>
-
offer
public boolean offer(Traverser.Admin<S> traverser)
-
remove
public Traverser.Admin<S> remove()
-
poll
public Traverser.Admin<S> poll()
-
element
public Traverser.Admin<S> element()
-
peek
public Traverser.Admin<S> peek()
-
remove
public boolean remove(Object traverser)
- Specified by:
remove
in interfaceCollection<S>
- Specified by:
remove
in interfaceSet<S>
- Overrides:
remove
in classAbstractCollection<Traverser.Admin<S>>
-
clear
public void clear()
- Specified by:
clear
in interfaceCollection<S>
- Specified by:
clear
in interfaceSet<S>
- Overrides:
clear
in classAbstractCollection<Traverser.Admin<S>>
-
spliterator
public Spliterator<Traverser.Admin<S>> spliterator()
- Specified by:
spliterator
in interfaceCollection<S>
- Specified by:
spliterator
in interfaceIterable<S>
- Specified by:
spliterator
in interfaceSet<S>
-
toString
public String toString()
- Overrides:
toString
in classAbstractCollection<Traverser.Admin<S>>
-
sort
public void sort(Comparator<Traverser<S>> comparator)
-
shuffle
public void shuffle(Random random)
-
-