org.onebusaway.utility.collections
Class TreeUnionFind<T>
java.lang.Object
org.onebusaway.utility.collections.TreeUnionFind<T>
public class TreeUnionFind<T>
- extends Object
Simple tree-based union find data structure.
- Author:
- bdferris
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TreeUnionFind
public TreeUnionFind()
contains
public boolean contains(T target)
find
public TreeUnionFind.Sentry find(T target)
members
public Set<T> members(TreeUnionFind.Sentry sentry)
union
public TreeUnionFind.Sentry union(T a,
T b)
unionWithSentry
public TreeUnionFind.Sentry unionWithSentry(TreeUnionFind.Sentry sentry,
T value)
unionWithSentries
public TreeUnionFind.Sentry unionWithSentries(TreeUnionFind.Sentry a,
TreeUnionFind.Sentry b)
getSets
public Collection<TreeUnionFind.Sentry> getSets()
getSetMembers
public Iterable<Set<T>> getSetMembers()
size
public int size()
isEmpty
public boolean isEmpty()
getElements
public Set<T> getElements()
iterator
public Iterator<T> iterator()
isSameSet
public boolean isSameSet(T a,
T b)
Copyright © 2012 OneBusAway. All Rights Reserved.