|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object edu.neu.ccs.demeterf.lib.RBTree<X> edu.neu.ccs.demeterf.lib.RBLeaf<X>
public class RBLeaf<X extends java.lang.Comparable<X>>
Represents the Leaf of an RBTree, e.g., the empty tree
Constructor Summary | |
---|---|
RBLeaf()
|
Method Summary | |
---|---|
RBNode<X> |
asNode()
|
boolean |
contains(X x,
java.util.Comparator<X> comp)
Is the given element in this RBTree, using the given Comparator? |
boolean |
containsAll(RBTree<X> x,
java.util.Comparator<X> comp)
Are all the elements int the given RBTree contained in this RBTree, using the given Comparator? |
boolean |
equals(java.lang.Object o)
|
X |
find(X x,
java.util.Comparator<X> comp)
Return the X in this RBTree that matches the given one, using the given Comparator |
int |
hashCode()
|
boolean |
isBlack()
|
boolean |
isLeaf()
Is this RBTree a leaf? |
boolean |
isRed()
|
X |
max()
Return this RBTree's maximum element (Only valid on RBNodes) |
X |
min()
Return this RBTree's minimum element (Only valid on RBNodes) |
X |
pred()
Return this RBTree's predicessor element (Only valid on RBNodes) |
RBTree<X> |
remove(X x)
Return this RBTree without the given (Comparable) element |
RBTree<X> |
remove(X x,
java.util.Comparator<X> c)
Return this RBTree without the given element, using the given Comparator |
RBTree<X> |
replace(X x,
java.util.Comparator<X> comp)
Return a new RBTree without the given element, using the given Comparator |
int |
size()
Return the number of elements in the RBTree |
X |
succ()
Return this RBTree's successor element (Only valid on RBNodes) |
List<X> |
toList()
Return all the elements in thei RBTree as a List in order |
java.lang.String |
toString()
|
Methods inherited from class edu.neu.ccs.demeterf.lib.RBTree |
---|
black, contains, containsAll, create, create, find, insert, insert, insertAll, insertAll, insertAll, insertAll, iterator, leaf, node, red, replace |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public RBLeaf()
Method Detail |
---|
public java.lang.String toString()
toString
in class java.lang.Object
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public boolean isLeaf()
RBTree
isLeaf
in class RBTree<X extends java.lang.Comparable<X>>
public boolean isBlack()
public boolean isRed()
public boolean contains(X x, java.util.Comparator<X> comp)
RBTree
contains
in class RBTree<X extends java.lang.Comparable<X>>
public boolean containsAll(RBTree<X> x, java.util.Comparator<X> comp)
RBTree
containsAll
in class RBTree<X extends java.lang.Comparable<X>>
public X find(X x, java.util.Comparator<X> comp)
RBTree
find
in class RBTree<X extends java.lang.Comparable<X>>
public List<X> toList()
RBTree
toList
in class RBTree<X extends java.lang.Comparable<X>>
public RBNode<X> asNode()
public X pred()
RBTree
pred
in class RBTree<X extends java.lang.Comparable<X>>
public X succ()
RBTree
succ
in class RBTree<X extends java.lang.Comparable<X>>
public X min()
RBTree
min
in class RBTree<X extends java.lang.Comparable<X>>
public X max()
RBTree
max
in class RBTree<X extends java.lang.Comparable<X>>
public RBTree<X> remove(X x)
RBTree
remove
in class RBTree<X extends java.lang.Comparable<X>>
public RBTree<X> remove(X x, java.util.Comparator<X> c)
RBTree
remove
in class RBTree<X extends java.lang.Comparable<X>>
public RBTree<X> replace(X x, java.util.Comparator<X> comp)
RBTree
replace
in class RBTree<X extends java.lang.Comparable<X>>
public int size()
RBTree
size
in class RBTree<X extends java.lang.Comparable<X>>
public int hashCode()
hashCode
in class RBTree<X extends java.lang.Comparable<X>>
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |